Skip to content

Commit

Permalink
Merge pull request #732 from uber/lu.boxed
Browse files Browse the repository at this point in the history
Send unwrapped payload when a thrift method has boxed annotation
  • Loading branch information
skiptomylu committed Jul 20, 2020
2 parents d78103e + b766747 commit 398a6d1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions codegen/template_bundle/template_files.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion codegen/templates/http_client.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ func (c *{{$clientName}}) {{$methodName}}(
{{if and (.RequestBoxed) (eq .BoxedRequestType "[]byte")}}
err := req.WriteBytes("{{.HTTPMethod}}", fullURL, headers, r.{{.BoxedRequestName}})
{{else}}
err := req.WriteJSON("{{.HTTPMethod}}", fullURL, headers, r)
err := req.WriteJSON("{{.HTTPMethod}}", fullURL, headers, {{if .RequestBoxed -}}r.{{.BoxedRequestName}}{{- else -}}r{{- end -}})
{{end -}}
{{else}}
err := req.WriteJSON("{{.HTTPMethod}}", fullURL, headers, nil)
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 398a6d1

Please sign in to comment.