h,'"      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                                     0.0.0.0 None"%&)1> '$&%!#"!#"'$&%None"%&)1>>+ freckle-http,Stream pages of a paginated response, using Link to find next pages, freckle-http5Stream pages of a paginated response, using a custom  find next+ freckle-httpRun one request freckle-httpInitial request, freckle-http*How to get the next page from each request freckle-httpRun one request freckle-httpInitial request+,+,None"%&)1>- freckle-http7Thrown if we exhaust our retries limit and still see a 429:This typically means the API is not sending back accurate Retry-In values with 429 responses. Rationale: In order for 1" to function in the case when the  is using throwErrorStatusCodes for , we have to modify it to not throw on 429s specifically. Otherwise, the first response would just throw due to 4XX and never retry. However, in that case of someone expecting invalid statuses to throw an exception, if we exhaust our retries and still see a 429 at the end, an exception should be thrown.;Unfortunately, it's not possible to reuse the user-defined  in order to throw a uniform 3 in this case; so we throw this ourselves instead.2 freckle-http1" but with configurable retry limit12-.0/-.0/12None"%&)1>9 freckle-http#Type-class for making HTTP requests%Functions of this module require the 9 constraint. This type class allows us to instantiate differently in different contexts, most usefully with stubbed responses in test. (See Freckle.App.Test.Http.)The  instance does what you would expect, and can be used to either build your own instances: instance MonadIO m => MonadHttp (AppT m) where httpLbs = liftIO . httpLbs instance MonadHttp (HandlerFor App) where httpLbs = liftIO . httpLbs  Or directly, resp <- liftIO $ httpLbs ... ; freckle-http)Make a request and parse the body as JSON -- Throws, but only on a complete failure to perform the request resp <- ; $  " https://example.com" -- Safe access  resp :: Either 5& a -- Unsafe access (throws on Left) B resp :: m a < freckle-http;Make a request and decode the body using the given function0This be used to request other formats, e.g. CSV.= freckle-http4Request all pages of a paginated endpoint into some  For example,Interact with a paginated endpoint where each page is a JSON list, combining all the pages into one list (i.e. #) and throw on any decoding errors: = ; B $  " https://..."  This uses +, and so reads a Link( header. To do otherwise, drop down to , directly.The second argument is used to extract the data to combine out of the response. This is particularly useful for  values, like you may get from ;. It lives in m to support functions such as B.=Decoding errors can be handled differently by adjusting what ( you convert each page's response into: = ; fromResponseLenient $  " https://..." fromResponseLenient :: MonadLogger m => Response (Either e [MyJsonThing]) -> m [MyJsonThing] fromResponseLenient r = case getResponseBody r of Left _ -> [] <$ logWarn "..." Right a -> pure a See Freckle.Http.App.Paginate to process requested pages in a streaming fashion, or perform pagination based on somethign other than Link.B freckle-httpRead an  response body, throwing any  as an exceptionIf you plan to use this function, and haven't built your decoding to handle error response bodies too, you'll want to use 0 so that you see status-code exceptions before 5s.4>?AB? @ABCDEF None"%&)1>R freckle-httpRun a request without automatic  decompress and tag the body typeS freckle-http Gunzip a Q body, if necessarySRQQRSNone"%&)1>" freckle-httpDefaults to 0 if missing freckle-http Return a  for a , if it's cacheableA  is cacheable if all are true:The given predicate succeedsThe method is GETA  Cache-Control header with no-store is not presentIf cacheable, the ? is built from: method, scheme, host, port, path, query + any Vary headers. freckle-http Return a  for a , if it's cacheableA  is cacheable if all are true:A  Cache-Control header with no-store is not present+If the cache is shared (first argument), a  Cache-Control header with private is not preset(The response has a cacheable status codeIf cacheable, the Cache-Control[max-age], Age, and Expires+ response headers are used to compute the . freckle-httpAs per RFC 7231 $https://stackoverflow.com/a/39406969 freckle-http https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Date#syntaxoWXZ[Y\]^`_abcdefgmhlkjinQejikgfnmlhadcb\`_]^oWXZ[YQNone"%&)1> ~}|WXZ[Yyz{wx WXZ[Yy{zwx|}~None"%&)1> freckle-httpRepresentation of W that can be given a  instanceIn  we need to flatten the Response down and remove fields that can't (or shouldn't) be cached, then restore them again later in . freckle-httpDefault TTL, used when max-age is not present None"%&)1> freckle-httpMatch a  Success is  (), failure is a message in . freckle-http4Label to show infix when comparison fails, e.g. "!=" freckle-httpHow to compare values freckle-httpLabel for the property itself freckle-httpValue to compare to property freckle-httpFunction to get property from  None"%&)1>! freckle-http)Fields that can be defined for a response freckle-http Respond to a  with the first  to matchIf no stubs match,  is used. If you'd rather experience a 404, add a final stub for any request that does that:  stubs :: [$] stubs = [ -- ... , -- ... ,  "Anything"  &  .~  status404 &  .~ "Not found" ]  freckle-http1Respond 200 with empty body for matching requests freckle-httpRespond 200 with empty body for requests parsed from the given URL freckle-httpModify the stub to match JSON requests and respond with the given value freckle-httpLoad stubs from the filesystemWithin the given directory, files are expected to be named for scheme, then host, then pathportquery.Given, files/ https/ www.example.com/ hello => Hello! world => World http/ localhost:3000/ hello?world=1 => "Hello 2" Then  "files" is equivalent to, [ stubUrl# "https://www.example.com/hello" &  .~ "Hello" , stubUrl# "https://www.example.com/world" &  .~ "World" , stubUrl) "http://localhost:3000/hello?world=1" &  .~ "Hello 2" ] 1NB. This function currently abuses the fact that / within filenames is the same for URLs, and so will not work on Windows. Patches welcome."" None"%&)1>"None"%&)1>" !"#$%&$%'$%($%)$%*$%+$%,$%-$%.$%/$01$012$03$04$05$06$0789:;<= >?@ABCCCDCEFGHIJJJKJLMNOPQRSTUVWXYZ[\]^_`abcdefghijkkklkmknooopoqorssstsuvvvwvxvyvzv{v|v}v~                           n                            +freckle-http-0.0.0.0-28sZwe3j6CTKBrjrPGUnKhFreckle.App.HttpFreckle.App.Http.HeaderFreckle.App.Http.PaginateFreckle.App.Http.RetryFreckle.App.Http.Cache.GzipFreckle.App.Http.CacheFreckle.App.Http.Cache.State Freckle.App.Http.Cache.Memcached"Freckle.App.Test.Http.MatchRequestFreckle.App.Test.HttpFreckle.App.HttpSpec freckle-http $dmgetHeaderPaths_freckle_http)http-client-0.7.18-KsWxuZmtYTjClSIIwcTqMENetwork.HTTP.Client.TypesResponseRequest HttpExceptionHttpExceptionRequestInvalidUrlExceptionNetwork.HTTP.Client.Request parseRequest parseRequest_setRequestCheckStatus+http-conduit-2.3.9.1-BbfedpUiVGxFcnxlWrnHrcNetwork.HTTP.SimplesetRequestPathaddRequestHeaderaddToRequestQueryStringsetRequestBodyJSONsetRequestBodyURLEncodedsetRequestBasicAuthgetResponseStatusgetResponseBody(http-types-0.12.4-9axvx8Zvynd3mf3lwIdfRdNetwork.HTTP.Types.Method StdMethodGETPOSTHEADPUTDELETETRACECONNECTOPTIONSPATCHNetwork.HTTP.Types.StatusStatus statusCodestatusIsInformationalstatusIsSuccessfulstatusIsRedirectionstatusIsClientErrorstatusIsServerError HasHeaders getHeaders getHeader getHeaderCsv splitHeader lookupHeader$fHasHeadersResponse$fHasHeadersRequest$fHasHeadersListsourcePaginatedsourcePaginatedByRetriesExhausted reResponsereLimit rateLimited rateLimited'$fExceptionRetriesExhausted$fShowRetriesExhaustedHttpDecodeError hdeErrorshdeBody MonadHttphttpLbshttpJson httpDecode httpPaginatedaddAcceptHeaderaddBearerAuthorizationHeadersetRequestMethoddisableRequestDecompressgetResponseBodyUnsafehttpExceptionIsInformationalhttpExceptionIsRedirectionhttpExceptionIsClientErrorhttpExceptionIsServerError$fMonadHttpValidateT$fMonadHttpExceptT$fMonadHttpStateT$fMonadHttpWriterT$fMonadHttpReaderT$fMonadHttpMaybeT $fMonadHttpIO$fExceptionHttpDecodeError$fEqHttpDecodeError$fShowHttpDecodeErrorPotentiallyGzippedrequestPotentiallyGzippedgunzipResponseBody$fShowPotentiallyGzipped$fEqPotentiallyGzipped$fSerialisePotentiallyGzippedCachedResponsettlinsertedresponse HttpCacheevictsetgetHttpCacheCodec deserialise serialiseHttpCacheSettingscachecodeclogWarnlogDebuggetCurrentTime defaultTTL cacheableshared httpCached$fEqCacheControl$fShowCacheControl $fEqSeconds $fNumSeconds $fShowSeconds $fReadSeconds$fShowCachedResponseHasCachecacheLCachemapstateHttpCacheSettingsstateHttpCacheCodecstateHttpCache$fHasCacheCache$fSemigroupCache $fMonoidCachememcachedHttpCacheSettingsmemcachedHttpCodecmemcachedHttpCache $fSerialiseCI$fGenericSerialiseResponse$fSerialiseSerialiseResponse$fSerialiseStatus$fSerialiseHttpVersion MatchRequest MatchAnythingMatchAnd MatchMethod MatchSecure MatchHost MatchPort MatchPath MatchQuery MatchHeaders MatchHeader MatchBodymatchRequestFromUrl matchRequestshowMatchRequestshowMatchRequestWithMismatches$fSemigroupMatchRequest$fShowMatchRequest HttpStubsTReaderHttpStubsunwrap HasHttpStubs httpStubsLHttpStubmatchlabel httpStubbedlabelLmatchLhttpStub httpStubUrlstatusLheadersLbodyLjsonloadHttpStubsDirectory runHttpStubsT$fIsStringHttpStub$fHasHttpStubsList$fMonadHttpReaderHttpStubs$fFunctorHttpStubsT$fApplicativeHttpStubsT$fMonadHttpStubsT$fMonadReaderListHttpStubsT$fMonadHttpHttpStubsT$fFunctorReaderHttpStubs$fApplicativeReaderHttpStubs$fMonadReaderHttpStubs$fMonadReaderenvReaderHttpStubsspec checkResponseghc-prim GHC.TypesIObaseGHC.BaseMonoid Data.Foldableconcat Data.EitherEitherLeftResponseHeadersagegetCachableRequestKey0freckle-memcached-0.0.0.2-LG1F7lsLPuw8VPyt8MfQHfFreckle.App.Memcached.CacheKeyCacheKeygetCachableResponseTTLFreckle.App.Memcached.CacheTTLCacheTTLcacheableStatusCodeshttpDateFormatSerialiseResponse(serialise-0.2.6.1-CbgyUh6kU7Z8GD6NVKGXIzCodec.Serialise.Class Serialise fromResponse toResponseRight propMismatchHttpStubResponseGHC.Errerror getBinDir getDataDirgetDataFileName getDynLibDir getLibDir getLibexecDir getSysconfDirversion