Skip to main content

create_http_client

Function create_http_client 

Source
pub fn create_http_client() -> Client
Expand description

Creates a properly configured reqwest Client with connection pooling and timeouts.

This client is designed to prevent file descriptor exhaustion by:

  • Limiting idle connection pool size per host
  • Setting idle connection timeouts to clean up unused connections
  • Adding request timeouts to prevent indefinite hangs

Use this for ALL reqwest client creation to ensure consistent resource management.