export DefaultContentType
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
parent
b216aa3509
commit
4237630f98
6
http.go
6
http.go
@ -21,6 +21,10 @@ import (
|
|||||||
"github.com/unistack-org/micro/v3/router"
|
"github.com/unistack-org/micro/v3/router"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
var (
|
||||||
|
DefaultContentType = "application/json"
|
||||||
|
)
|
||||||
|
|
||||||
func filterLabel(r []router.Route) []router.Route {
|
func filterLabel(r []router.Route) []router.Route {
|
||||||
// selector.FilterLabel("protocol", "http")
|
// selector.FilterLabel("protocol", "http")
|
||||||
return r
|
return r
|
||||||
@ -521,7 +525,7 @@ func NewClient(opts ...client.Option) client.Client {
|
|||||||
options := client.NewOptions(opts...)
|
options := client.NewOptions(opts...)
|
||||||
|
|
||||||
if len(options.ContentType) == 0 {
|
if len(options.ContentType) == 0 {
|
||||||
options.ContentType = "application/json"
|
options.ContentType = DefaultContentType
|
||||||
}
|
}
|
||||||
|
|
||||||
rc := &httpClient{
|
rc := &httpClient{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user