Skip to content

Commit

Permalink
[rust][reqwest] support binary responses that don't have any return type
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Ville committed Nov 7, 2024
1 parent 82250cc commit 1404614
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -362,18 +362,18 @@ pub {{#supportAsync}}async {{/supportAsync}}fn {{{operationId}}}(configuration:

if !local_var_status.is_client_error() && !local_var_status.is_server_error() {
{{^supportMultipleResponses}}
{{^returnType}}
Ok(())
{{/returnType}}
{{#returnType}}
{{#isResponseFile}}
Ok(local_var_resp)
{{/isResponseFile}}
{{^isResponseFile}}
{{^returnType}}
Ok(())
{{/returnType}}
{{#returnType}}
let local_var_content = local_var_resp.text(){{#supportAsync}}.await{{/supportAsync}}?;
serde_json::from_str(&local_var_content).map_err(Error::from)
{{/isResponseFile}}
{{/returnType}}
{{/isResponseFile}}
{{/supportMultipleResponses}}
{{#supportMultipleResponses}}
{{#isResponseFile}}
Expand Down

0 comments on commit 1404614

Please sign in to comment.