Commit Graph

42 Commits

Author SHA1 Message Date
Aliaksandr Valialkin 87d525b89a Removed unused Logger from Client and HostClient 2015-11-28 10:42:01 +02:00
Aliaksandr Valialkin df6fda8c33 Added ability to limit request body size on the server and response body size on the client 2015-11-27 13:22:15 +02:00
Aliaksandr Valialkin a3fd75d237 Eliminated memory allocations from client's DoTimeout and GetTimeout 2015-11-26 17:04:27 +02:00
Aliaksandr Valialkin 79313ec7a9 Fixed a bug in ipv4 addresses resolution if the resolved ip addresses contain non-zero number of ipv6 addresses 2015-11-25 15:23:42 +02:00
Aliaksandr Valialkin 6816e2b03c Clients dial only ipv4 addresses by default due to bad ipv6 support in our networks. Use DialDualStack for dialing both ipv4 and ipv6 addresses 2015-11-25 15:14:31 +02:00
Aliaksandr Valialkin 0fa8e8efc7 Client: dial both tcp4 and tcp6 addresses 2015-11-25 14:30:51 +02:00
Aliaksandr Valialkin 0b2690febe Added GetTimeout method to client 2015-11-25 13:45:34 +02:00
Aliaksandr Valialkin 9decd4d0ac Properly handle negative timeouts in client's DoTimeout 2015-11-24 17:33:25 +02:00
Aliaksandr Valialkin c6fcca3ae6 Added ReadTimeout and WriteTimeout settings to client 2015-11-24 17:14:34 +02:00
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