HTTP Configuration
These CodeGen settings allow you to manage HTTP configurations in the generated SDKs.
Enable HTTP Cache
Use this setting to enable/disable HTTP caching for idempotent endpoint methods.
Please note that this setting is experimental and may not function properly at all times. Feel free to contact our support if you run into an issue.
Usage
To use this feature, you need to specify a Boolean
type. By default, its value is set to false
.
"info": {
...,
"x-codegen-settings": {
"EnableHttpCache": false
}
}
Language Support
C# | Java | PHP | Python | Ruby | TS | Go |
---|---|---|---|---|---|---|
❌ | ❌ | ❌ | ✔️ | ✔️ | ❌ | ❌ |
Append Content Headers
Enabling this setting will automatically determine the request and response content types and append appropriate accept
and content-type
headers. This affects the generated SDK as well as the HTTP documentation. For example, accept: application/json
and content-type: application/json
headers will be appended for JSON serialization mode.
Usage
To use this feature, you need to specify a Boolean
type. By default, its value is set to true
.
"info": {
...,
"x-codegen-settings": {
"AppendContentHeaders": true
}
}
Language Support
C# | Java | PHP | Python | Ruby | TS | Go |
---|---|---|---|---|---|---|
✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
Change in API Call
You can see the change this setting has in the HTTP curl command:
Value | Change |
true (default) |
|
false |
|
Allow Skipping SSL Certificate Verification
This setting creates a configuration option in SDKs to optionally skip certificate verification when establishing HTTPs connections.
Skipping verification of an SSL certificate is not the recommended approach as it opens the possibility of security vulnerability.
Usage
To use this feature, you need to specify a Boolean
type. By default, its value is set to false
.
"info": {
...,
"x-codegen-settings": {
"AllowSkippingSSLCertVerification": false
}
}
Language Support
C# | Java | PHP | Python | Ruby | TS | Go |
---|---|---|---|---|---|---|
✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ❌ | ❌ |
Deprecated Settings
We have marked the following settings as deprecated since we will no longer provide support for them in the future.
Throw For HTTP Error Status Codes
Please be careful while using this setting as it might not function as intended under all scenarios.
Disable this setting to return status code and response instead of throwing an exception for error responses.
You can couple this setting with ReturnCompleteHttpResponse
setting to make implementation easier.
Usage
To use this feature, you need to specify a Boolean
type. By default, its value is set to true
.
"info": {
...,
"x-codegen-settings": {
"ThrowForHttpErrorStatusCodes": true
}
}
Language Support
C# | Java | PHP | Python | Ruby | TS | Go |
---|---|---|---|---|---|---|
❌ | ❌ | ✔️ | ✔️ | ✔️ | ❌ | ❌ |
Change in SDK
Configuring this setting has the following effect on the generated SDK:
- PHP
Value | Change |
true (default) |
|
false |
|