[python-nextgen] Fix binary response (#15076)

* fix binary response in python nextgen client

* update samples
This commit is contained in:
William Cheng
2023-03-31 16:16:58 +08:00
committed by GitHub
parent 05fa5601dd
commit b59d535176
36 changed files with 906 additions and 75 deletions

View File

@@ -91,12 +91,11 @@ public class Example {
defaultClient.setBasePath("http://localhost:3000");
BodyApi apiInstance = new BodyApi(defaultClient);
Pet pet = new Pet(); // Pet | Pet object that needs to be added to the store
try {
Pet result = apiInstance.testEchoBodyPet(pet);
File result = apiInstance.testBinaryGif();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling BodyApi#testEchoBodyPet");
System.err.println("Exception when calling BodyApi#testBinaryGif");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
@@ -113,6 +112,7 @@ All URIs are relative to *http://localhost:3000*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*BodyApi* | [**testBinaryGif**](docs/BodyApi.md#testBinaryGif) | **POST** /binary/gif | Test binary (gif) response body
*BodyApi* | [**testEchoBodyPet**](docs/BodyApi.md#testEchoBodyPet) | **POST** /echo/body/Pet | Test body parameter(s)
*BodyApi* | [**testEchoBodyPetResponseString**](docs/BodyApi.md#testEchoBodyPetResponseString) | **POST** /echo/body/Pet/response_string | Test empty response body
*FormApi* | [**testFormIntegerBooleanString**](docs/FormApi.md#testFormIntegerBooleanString) | **POST** /form/integer/boolean/string | Test form parameter(s)