Commit Graph

33 Commits

Author SHA1 Message Date
Aliaksandr Valialkin 3a1a2ddfc8 Randomize sleep time in Client.DoTimeout when waiting for free connection to the host 2015-11-23 12:26:32 +02:00
Aliaksandr Valialkin 46ac549ae1 Access URI members via accessors 2015-11-22 13:05:24 +02:00
Aliaksandr Valialkin a862d8592a Documentation update 2015-11-22 06:33:58 +02:00
Aliaksandr Valialkin 2d18e84d04 Handle 'no free connections to host' error when doing request with user-defined timeout 2015-11-22 06:00:04 +02:00
Aliaksandr Valialkin dec5ac841c Fixed a bug with improper HostClient map updating in Client.Do. This bug led to new HostClient creation on each Client.Do request 2015-11-22 01:10:41 +02:00
Aliaksandr Valialkin 2b1eca3a70 Optimize request uri parsing - defer Host header reading 2015-11-19 15:05:27 +02:00
Aliaksandr Valialkin 48c0f89ee7 Added Stringer implementations to URI, Args and Cookie 2015-11-19 12:51:34 +02:00
Aliaksandr Valialkin a2601c68af API consistency change - make Response.StatusCode accessor 2015-11-19 11:39:20 +02:00
Aliaksandr Valialkin 835bf87605 API consistency: Clear -> Reset to be consistent with standard go packages 2015-11-18 17:55:28 +02:00
Aliaksandr Valialkin b838ff99c7 Pass host:port as addr to custom DialFunc in HostClient 2015-11-18 17:20:25 +02:00
Aliaksandr Valialkin 86fe38c7a2 Hide Respone and Request body behind Body accessors 2015-11-18 14:00:24 +02:00
Aliaksandr Valialkin 42fc4078fb Formatting fix 2015-11-17 20:00:26 +02:00
Aliaksandr Valialkin 2dbf142a06 convert connectionClose to accessor 2015-11-16 18:23:08 +02:00
Aliaksandr Valialkin 22461f2c90 Access user-agent via UserAgent accessor 2015-11-16 16:35:35 +02:00
Aliaksandr Valialkin f1f78f0828 Hide Request.URI and Request.PostArgs behind accessors, which automatically call parse URI and PostArgs on first access 2015-11-15 23:47:22 +02:00
Aliaksandr Valialkin 8aef785c1e Added DoTimeout() to client 2015-11-14 23:18:52 +02:00
Aliaksandr Valialkin 1f531237c2 allow nil response in Do() and nil Args in Post() 2015-11-14 22:16:05 +02:00
Aliaksandr Valialkin 734c1a311b Retry idempotent requests on failure 2015-11-14 20:09:49 +02:00
Aliaksandr Valialkin 1f81c87c38 Substituted direct access to Request.Method by accessors, so package users don't shoot in the foot when assigning directly to Request.Method 2015-11-14 17:34:12 +02:00
Aliaksandr Valialkin 69f3c67fce Added benchmark for measuring the maximum client throughput 2015-11-13 19:38:46 +02:00
Aliaksandr Valialkin af2218ffaf Add optional Dial callback and TLSConfig to Client 2015-11-13 17:55:54 +02:00
Aliaksandr Valialkin 3648ae63f7 Optimized updating lastUseTime 2015-11-13 16:43:55 +02:00
Aliaksandr Valialkin f8bfa12215 Added Post() method to client 2015-11-13 16:13:22 +02:00
Aliaksandr Valialkin 15cd28e255 do not update HostClient.MaxConns 2015-11-13 11:57:39 +02:00
Aliaksandr Valialkin b81ce4977b Added https support to client 2015-11-12 21:42:16 +02:00
Aliaksandr Valialkin af69d3830f Added initial tests for Client 2015-11-12 20:23:57 +02:00
Aliaksandr Valialkin ad3c1b72d8 Added basic tests for HostClient 2015-11-12 20:09:21 +02:00
Aliaksandr Valialkin 039f2d074e Added support for request's 'Connection: close' header into http client 2015-11-12 19:16:32 +02:00
Aliaksandr Valialkin 0ba628eacc Document how server to be requested is determined by client 2015-11-12 14:57:27 +02:00
Aliaksandr Valialkin 5dd815b3d8 Added ability to set client name (aka User-Agent) 2015-11-12 14:37:09 +02:00
Aliaksandr Valialkin d30241c539 Added Get() to http client 2015-11-11 20:00:08 +02:00
Aliaksandr Valialkin 07e319a14f Move request validation and preparation down the stack to HostClient 2015-11-11 19:34:42 +02:00
Aliaksandr Valialkin 6bb8d1108f Initial implementation of http client 2015-11-11 19:17:51 +02:00