move default content type to const
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
parent
7a1fdef33a
commit
0fae2e1bdd
6
grpc.go
6
grpc.go
@ -22,6 +22,10 @@ import (
|
|||||||
gmetadata "google.golang.org/grpc/metadata"
|
gmetadata "google.golang.org/grpc/metadata"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
defaultContentType = "application/grpc+proto"
|
||||||
|
)
|
||||||
|
|
||||||
type grpcClient struct {
|
type grpcClient struct {
|
||||||
opts client.Options
|
opts client.Options
|
||||||
pool *pool
|
pool *pool
|
||||||
@ -723,7 +727,7 @@ func (g *grpcClient) getGrpcCallOptions() []grpc.CallOption {
|
|||||||
func NewClient(opts ...client.Option) client.Client {
|
func NewClient(opts ...client.Option) client.Client {
|
||||||
options := client.NewOptions(opts...)
|
options := client.NewOptions(opts...)
|
||||||
// default content type for grpc
|
// default content type for grpc
|
||||||
options.ContentType = "application/grpc+proto"
|
options.ContentType = defaultContentType
|
||||||
|
|
||||||
rc := &grpcClient{
|
rc := &grpcClient{
|
||||||
opts: options,
|
opts: options,
|
||||||
|
Loading…
Reference in New Issue
Block a user