Skip to content

Commit a4cd891

Browse files
committed
Return json response where possible
Previous implementation returned string
1 parent 9092b07 commit a4cd891

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

templates/go/client.go.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ type ClientResponse struct {
3636
Status string
3737
StatusCode int
3838
Header http.Header
39-
Result string
39+
Result interface{}
4040
}
4141

4242
func (ce *{{ spec.title | caseUcfirst }}Error) Error() string {
@@ -312,7 +312,7 @@ func (clt *Client) Call(method string, path string, headers map[string]interface
312312
Status: resp.Status,
313313
StatusCode: resp.StatusCode,
314314
Header: resp.Header,
315-
Result: string(output),
315+
Result: jsonResponse,
316316
}, nil
317317
}
318318
output, err := getOutput(params, fileNameKey, responseData, resp.Header.Get("content-type"))

0 commit comments

Comments
 (0)