justtrackio / gosoline

Gosoline is our framework which fuels all of our Golang applications
MIT License
93 stars 50 forks source link

http: allow configuring the HTTP transport for a client #1102

Closed ajscholl closed 5 months ago

ajscholl commented 5 months ago

This adds a whole bunch of settings relating to the http transport. You can configure them like this:

http_client:
    default:
        transport:
            tls_handshake_timeout: 10s
            disable_keep_alives: false
            disable_compression: false
            max_idle_conns: 100
            max_idle_conns_per_host: 0
            max_conns_per_host: 0
            idle_conn_timeout: 90s
            response_header_timeout: 0s
            expect_continue_timeout: 1s
            max_response_header_bytes: 0
            write_buffer_size: 0
            read_buffer_size: 0
            dialer:
                keep_alive: 30s
                timeout: 30s
                dual_stack: true
                fallback_delay: 0s