You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are scenarios where using the raw *HTTP.Client is desirable. This includes:
Scenarios where API definition is not currently supported by OpenAPI Generator and a fallback to native *HTTP.Client with BasePath is necessary. Examples include:
requests with multiple multipart/form-data files. Today only one file is supported in APIClient.prepareRequest
multipart/mixed responses. This is not handled in client.go's detectContentType
Scenarios where a third-party library uses a *HTTP.Client
Providing access to the *HTTP.Client and Configuration.BasePath is useful in these scenarios.
Of course, we should support the API use cases, but sometimes more invasive changes take longer to implement.
Provide accessors to APIClient.cfg.HTTPClient and APIClient.cfg.BasePath
The text was updated successfully, but these errors were encountered:
grokify
changed the title
[Golang][client] Allow external use by providing access to APIClient.cfg.HTTPClient & APIClient.cfg.BasePath
[Golang][client] Allow access to APIClient.cfg.HTTPClient & APIClient.cfg.BasePath
Oct 26, 2018
…3976)
* Allow retrieving the underlying configuration for APIClient
- Needed for dynamically changing the underlying implementations and
for testing
- Fixes#1321 and #3412
* Added go-petstore-withXml changes suggested by circleci
* Add caution note about modifying configuration while live
Description
There are scenarios where using the raw
*HTTP.Client
is desirable. This includes:*HTTP.Client
withBasePath
is necessary. Examples include:multipart/form-data
files. Today only one file is supported inAPIClient.prepareRequest
multipart/mixed
responses. This is not handled inclient.go
'sdetectContentType
*HTTP.Client
Providing access to the *HTTP.Client and Configuration.BasePath is useful in these scenarios.
Of course, we should support the API use cases, but sometimes more invasive changes take longer to implement.
openapi-generator version
master
OpenAPI declaration file content or url
Command line used for generation
n/a
Steps to reproduce
n/a
Related issues/PRs
Suggest a fix/enhancement
Either:
APIClient.cfg
APIClient.cfg.HTTPClient
andAPIClient.cfg.BasePath
The text was updated successfully, but these errors were encountered: