Changelog for req-2.1.0
Req 2.1.0
-
Dropped support for GHC 7.10.
-
Added the new
acceptHeadermethod to theHttpResponsetype class. Notably, thejsonResponsemethod now sets"Accept"header to"application/json".
Req 2.0.1
- Fixed the
httpbintests (they changed something on the server again).
Req 2.0.0
- Got rid of
data-default-classdependency, now we exportdefaultHttpConfiginstead.
Req 1.2.1
- Fixed a typo in the type signature of
parseUrl.
Req 1.2.0
- Added the
parseUrlfunction.
Req 1.1.0
-
Added
customAuthandattachHeaderto facilitate creation of custom authentication options. -
Added
basicProxyAuthauthentication option.
Req 1.0.0
-
Added the
reqBrfunction allowing to consumeResponse BodyReaderwithout using a pre-defined instance ofHttpResponse, in a custom way. -
Now streaming of response body does not happen until we've checked headers and status code with
httpConfigCheckResponse. It also doesn't happen on every retry. Streaming and obtaining of final response value happens only once when we're happy with everything.Previously we first tried to consume and interpret response body before checking status code and determining whether we should retry the request. This was not good, because we could expect a JSON response but get a response with status code 500, and then still we would try to parse it as JSON first before letting
httpConfigCheckResponsethrow an exception.The corrected behavior should also make retrying more efficient.
-
Changed signatures of several fields of
HttpConfig:httpConfigCheckResponse,httpConfigRetryPolicy, andhttpConfigRetryJudgein order to eliminate redundantIOand prevent the possibility that these functions could start consumingBodyReader. -
Removed the
makeResponsePreviewmethod from theHttpResponsetype class. Preview business is handled by the library automatically on a lower level now. Users do not need to concern themselves with such stuff. -
Changed the type signature of the
getHttpResponsemethod of theHttpResponsetype class. Previously it left too much freedom (and responsibility) to implementers of the method. In fact, we now limit whatgetHttpResponsedoes to just consuming and interpretingResponse BodyReader, so we can properly control details of connection opening/closing etc., for the user. -
Dropped support for GHC 7.8.
-
Minor documentation improvements.
Req 0.5.0
-
Changed the signature of the
makeResponseBodyPreviewfromresponse -> IO ByteStringtoresponse -> ByteString. -
Minor documentation improvements.
Req 0.4.0
- Added the
Reqmonad andrunReqfunction to run it. This allows to usereqwithout defining new (orphan) instances.
Req 0.3.1
- Added
basicAuthUnsafe.
Req 0.3.0
-
Made URL parsing functions
parseUrlHttpandparseUrlHttpsrecognize port numbers. -
Added
req'function that allows to perform requests via a callback that receives pre-constructed request and manager. -
Removed the
ReturnRequestHTTP response implementation as it was not quite safe and was not going to work with retrying. Usereq'instead for “pure” testing. -
Changed the type of
httpConfigCheckResponse, so the second argument can be any instance ofHttpResponse. -
Added built-in automatic retrying. See
httpConfigRetryPolicyandhttpConfigRetryJudgeinHttpConfig. The default configuration retries 5 times on request timeouts. -
Added the
makeResponseBodyPreviewmethod to theHttpResponsetype class that allows to specify how to build a “preview” of response body for inclusion into exceptions. -
Improved wording in the documentation and
README.md.
Req 0.2.0
-
Added support for multipart form data in the form of
ReqBodyMultipartbody option andreqBodyMultiparthelper function. This also required a change in the type signature ofgetRequestContentType, which now takesbody, notProxy bodybecause we need to extract boundary frombodyand put it intoContent-Typeheader. This change, however, shouldn't be too dangerous for end-users. -
Added support for OAuth 1.0 authentication via
oAuth1option.
Req 0.1.0
- Initial release.