pass body opion to http client

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
Василий Толстов 2021-01-19 04:15:19 +03:00
parent 1f8cb74813
commit 1ba34c65f0
2 changed files with 4 additions and 3 deletions

File diff suppressed because one or more lines are too long

View File

@ -57,6 +57,7 @@ func (c *{{$ServiceName | lowerFirst}}Service) {{.Name}}(ctx context.Context, re
nopts := append(opts, nopts := append(opts,
micro_client_http.Method("{{httpVerb .}}"), micro_client_http.Method("{{httpVerb .}}"),
micro_client_http.Path("{{httpPath .}}"), micro_client_http.Path("{{httpPath .}}"),
micro_client_http.Body("{{httpBody .}}"),
{{- if not (contains (json (openapiOption .)) "null") }} {{- if not (contains (json (openapiOption .)) "null") }}
{{- if (openapiOption .).Responses }} {{- if (openapiOption .).Responses }}
micro_client_http.ErrorMap(errmap), micro_client_http.ErrorMap(errmap),