Skip to main content

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.

note

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#JavaPHPPythonRubyTSGo
✔️✔️

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#JavaPHPPythonRubyTSGo
✔️✔️✔️✔️✔️✔️✔️

Change in API Call

You can see the change this setting has in the HTTP curl command:

Value Change
true (default)
curl -X GET -G \
--url 'http://localhost:3000/response/date' \
-H 'Accept: application/json' \
-d 'array=true'
false
curl -X GET -G \
--url 'http://localhost:3000/response/date' \
-d 'array=true'

Allow Skipping SSL Certificate Verification

This setting creates a configuration option in SDKs to optionally skip certificate verification when establishing HTTPs connections.

caution

Skipping verification of an SSL certificate isn't 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#JavaPHPPythonRubyTSGo
✔️✔️✔️✔️✔️