Skip to content

Add HttpTransportConfig for transport settings#1074

Merged
mtdowling merged 2 commits intomainfrom
http-transport-config
Mar 13, 2026
Merged

Add HttpTransportConfig for transport settings#1074
mtdowling merged 2 commits intomainfrom
http-transport-config

Conversation

@mtdowling
Copy link
Member

@mtdowling mtdowling commented Mar 13, 2026

Add HttpTransportConfig to support configuring connect/request timeouts and HTTP version through the transport factory's Document-based configuration. Update JavaHttpClientTransport.Factory to use it instead of manually parsing the document.

Add this to the codegen plugin settings:

{
    "version": "1.0",
    "plugins": {
        "java-codegen": {
            "service": "com.example#CoffeeShop",
            "namespace": "com.example.client",
            "modes": ["client"],
            "httpConfig": {
                "connectTimeoutMs": 3000,
                "requestTimeoutMs": 5000
            }
        }
    }
}

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Add HttpTransportConfig to support configuring connect/request timeouts
and HTTP version through the transport factory's Document-based
configuration. Update JavaHttpClientTransport.Factory to use it instead
of manually parsing the document.
This new shared httpConfig setting makes it possible to tweak the
common HTTP settings across any dynamically resolved transport.
Transport-factory-specific settings override these, if they choose to
(e.g., if they're http-specific).
@mtdowling mtdowling enabled auto-merge (rebase) March 13, 2026 20:56
@mtdowling mtdowling merged commit 2983fb5 into main Mar 13, 2026
4 checks passed
@mtdowling mtdowling deleted the http-transport-config branch March 13, 2026 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants