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