D1      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~None Safe-Inferred  None-       (c) 2014 Bryan O'Sullivan BSD-stylebos@serpentine.com experimentalGHCNone !"+-24HMmA session that spans multiple requests. This is responsible for cookie management and TCP connection reuse.DA function that runs a request and returns the associated response.(A request that is ready to be submitted.An element of a Link header.The error type used by   and  ; if a failure occurs when parsing a response body as JSON.A key/value pair for an !application/x-www-form-urlencoded POST request body.TA type that can be rendered as the value portion of a key/value pair for use in an !application/x-www-form-urlencoded' POST body. Intended for use with the  type.The instances for  , strict  , and lazy   7 are all encoded using UTF-8 before being URL-encoded.The instance for  gives an empty string on 4, and otherwise uses the contained type's instance.Render the given value.;A product type for representing more complex payload types. 8A type that can be converted into a PUT request payload.!RRepresent a value in the request body (and perhaps the headers) of a PUT request."9A type that can be converted into a POST request payload.#SRepresent a value in the request body (and perhaps the headers) of a POST request.%AWS request signing version 4&Supported authentication types.Do not use HTTP authentication unless you are using TLS encryption. These authentication tokens can easily be captured and reused by an attacker if transmitted in the clear.'>Amazon Web Services request signing AWSAuthVersion key secret(A not-quite-standard OAuth2 bearer token (that seems to be used only by GitHub). This is treated by whoever accepts it as the equivalent of a username and password.)gAn OAuth2 bearer token. This is treated by many services as the equivalent of a username and password.*FBasic authentication. This consists of a plain username and password.+ZA function that checks the result of a HTTP request and potentially returns an exception.,!Options for configuring a client..Either configuration for a , or an actual .If only & are provided, then by default a new " will be created for each request.Note#: when issuing HTTP requests using ,-based functions from the the Network.Wreq.Session module (, %, etc.), this field will be ignored.'An example of using a specific manager: import Network.HTTP.Client ()  $ \mgr -> do let opts =  { . = Right mgr }  opts "http://httpbin.org/get" ;An example of changing settings (this will use a separate U for every request, so make sense only if you're issuing a tiny handful of requets): import Network.HTTP.Client () let settings = % { managerConnCount = 5 } opts =  { . = Left settings }  opts "http://httpbin.org/get" /.Host name and port for a proxy to use, if any.0Authentication information.Example (note the use of TLS):  let opts =  { 0 =  "user" "pass" } 2 opts "https://httpbin.org/basic-auth/user/pass" 1-Additional headers to send with each request.  let opts =  { 1 = [("Accept", "*/*")] }  opts "http://httpbin.org/get" 2LKey-value pairs to assemble into a query string to add to the end of a URL.For example, given:  let opts = 7 { params = [("sort", "ascending"), ("key", "name")] }  opts "http://httpbin.org/get" %This will generate a URL of the form: .http://httpbin.org/get?sort=ascending&key=name3[The maximum number of HTTP redirects to follow before giving up and throwing an exception.In this example, a  will be thrown with a P constructor, because the maximum number of redirects allowed will be exceeded:  let opts =  { 3 = 3 } ' opts "http://httpbin.org/redirect/5" 4%Cookies to set when issuing requests.Note#: when issuing HTTP requests using ,-based functions from the the Network.Wreq.Session module (, /, etc.), this field will be used only for the first% HTTP request to be issued during a D. Any changes changes made for subsequent requests will be ignored.5KFunction that checks the status code and potentially returns an exception.This defaults to &, which will just use the default of  which throws a StatusException if the status is not 2XX.6A MIME content type, e.g. "application/octet-stream".7)Return the URL associated with the given .SThis includes the port number if not standard, and the query string if one exists.; !"#$%&'()*+,-./012345676 !"#$%&'()*+,-./01234567 !"#$%&*)('+, -./01234567NoneHM;Set a header to the given value, replacing any prior value.MSet a header to the given value, but only if the header was not already set.888None(c) 2014 Bryan O'Sullivan BSD-stylebos@serpentine.com experimentalGHCNone24$& !"#$%&'()*+,-./01234567&,-./012345&*)('$%+"# !67$None           None3HM+ !"#$%&'()*+,-./01234567891 , !"#$%&'()*+,-./012345789+ !"#$%&'()*+,-./0123456789(c) 2014 Bryan O'Sullivan BSD-stylebos@serpentine.com experimentalGHCNoneHM*9YA lens onto configuration of the connection manager provided by the http-client package.RIn this example, we enable the use of OpenSSL for (hopefully) secure connections: import OpenSSL.Session ( ) import Network.HTTP.Client.OpenSSL let opts =   9   Left (!" ) !# $ ! opts "https://httpbin.org/get" HIn this example, we also set the response timeout to 10000 microseconds: import OpenSSL.Session ( ) import Network.HTTP.Client.OpenSSL import Network.HTTP.Client (, $) let opts =   9   Left (!" )  9   Left ( { $ = Just 10000 } ) !# $ ! opts "https://httpbin.org/get" : A lens onto proxy configuration.Example:  let opts =   : % & "localhost" 8000  opts "http://httpbin.org/get" Note here the use of the % setter to turn a  into a  3, to make the type of the RHS compatible with the '( lens.;#A lens onto request authentication.Example (note the use of TLS):  let opts =   ') %  "user" "pass" 2 opts "https://httpbin.org/basic-auth/user/pass" <VA lens onto all headers with the given name (there can legitimately be zero or more).Example:  let opts =   < "Accept"   ["*/*"]  opts "http://httpbin.org/get" =AA lens onto all headers (there can legitimately be zero or more).NIn this example, we print all the headers sent by default with every request. print ( * =) >_A lens onto all query parameters with the given name (there can legitimately be zero or more)..In this example, we construct the query URL "'http://httpbin.org/get?foo=bar&foo=quux".  let opts =   > "foo"   ["bar", "quux"]  opts "http://httpbin.org/get" ?!A lens onto all query parameters.@aA lens onto the maximum number of redirects that will be followed before an exception is thrown.In this example, a  will be thrown with a P constructor, because the maximum number of redirects allowed will be exceeded.  let opts =   @   3 ' opts "http://httpbin.org/redirect/5" A0A lens to get the optional status check functionB?A traversal onto the cookie with the given name, if one exists.N.B. This is an "illegal" :: we can change the D of the associated = so that it differs from the name provided to this function.CA lens onto all cookies.D!A lens onto the name of a cookie.E"A lens onto the value of a cookie.F(A lens onto the expiry time of a cookie.G#A lens onto the domain of a cookie.H!A lens onto the path of a cookie.I*A lens onto the creation time of a cookie.J-A lens onto the last access time of a cookie.K`A lens onto whether a cookie is persistent across sessions (also known as a "tracking cookie").L*A lens onto whether a cookie is host-only.MVA lens onto whether a cookie is secure-only, such that it will only be used over TLS.N,A lens onto whether a cookie is "HTTP-only".Such cookies should be used only by browsers when transmitting HTTP requests. They must be unavailable in non-browser environments, such as when executing JavaScript scripts.O:A lens onto the hostname portion of a proxy configuration.P9A lens onto the TCP port number of a proxy configuration.Q+A lens onto the status of an HTTP response.R,A lens onto the version of an HTTP response.S;A lens onto all matching named headers in an HTTP response.cTo access exactly one header (the result will be the empty string if there is no match), use the (* ) operator. r <- +# "http://httpbin.org/get" print (r * S "Content-Type") 1To access at most one header (the result will be " if there is no match), use the (, ) operator. r <- +# "http://httpbin.org/get" print (r , S "Content-Transfer-Encoding") 9To access all (zero or more) matching headers, use the (- ) operator. r <- +# "http://httpbin.org/get" print (r - S "Set-Cookie") T,A lens onto all headers in an HTTP response.U A fold over Link5 headers, matching on both parameter name and value.For example, here is a Link* header returned by the GitHub search API. Link: <https://api.github.com/search/code?q=addClass+user%3Amozilla&page=2>; rel="next", <https://api.github.com/search/code?q=addClass+user%3Amozilla&page=34>; rel="last">And here is an example of how we can retrieve the URL for the next link programatically. r <- +G "https://api.github.com/search/code?q=addClass+user:mozilla" print (r , U "rel" "next" . [) V#A lens onto the body of a response. r <- +# "http://httpbin.org/get" print (r * V) W2A fold over any cookies that match the given name. r <- +$ "http://www.nytimes.com/" print (r , responseCookie "RMID") X,A lens onto all cookies set in the response.Y5A lens onto the numeric identifier of an HTTP status.Z6A lens onto the textual description of an HTTP status.[!A lens onto the URL portion of a Link element.\ A lens onto the parameters of a Link element.]A lens onto the name of the  input: element associated with part of a multipart form upload.^JA lens onto the filename associated with part of a multipart form upload._NA lens onto the content-type associated with part of a multipart form upload.`\A lens onto the code that fetches the data associated with part of a multipart form upload.aTurn an attoparsec ; into a <.PBoth headers and bodies can contain complicated data that we may need to parse.Example: when responding to an OPTIONS request, a server may return the list of verbs it supports in any order, up to and including changing the order on every request (which httpbin.org /actually does/!). To deal with this possibility, we parse the list, then sort it.,import Data.Attoparsec.ByteString.Char8 as Aimport Data.List (sort))let comma = skipSpace >> "," >> skipSpace3let verbs = A.takeWhile isAlpha_ascii `sepBy` comma%r <- options "http://httpbin.org/get"2r ^. responseHeader "Allow" . atto verbs . to sort["GET","HEAD","OPTIONS"]b The same as a9, but ensures that the parser consumes the entire input.Equivalent to: b myParser = a (myParser = >) *9:;<=>?@ABCDEFGHIJKLMNOPQRSHeader name to match.TUParameter name to match.Parameter value to match.VWName of cookie to match.XYZ[\]^_`ab2 +,9:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`ab2,9:;<>@=?BC+AOPDEFGHIJKLMNVSUWTXQR YZ[\]^_`ab*9:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abNone+-03?@ABCDEFGHIJcKLMNdeOPQRcdeedc ? IHGFEDCBA@JcKLMNdeOPQR.None!"SfTUVWXYZ[\]^_`abcdefghSfUVWXY`abcdefghSfTUVWXYZ[\]^_`abcdefgh(c) 2014 Bryan O'Sullivan BSD-stylebos@serpentine.com experimentalGHCNone3gIssue a GET request.Example: g "http://httpbin.org/get" !r <- get "http://httpbin.org/get" r ^. responseStatus . statusCode200i(Issue a GET request, using the supplied ,.Example:  let opts = f i > "foo" j ["bar"] i opts "http://httpbin.org/get" ,let opts = defaults & param "foo" .~ ["bar"]*r <- getWith opts "http://httpbin.org/get"r ^? responseBody . key "url".Just (String "http://httpbin.org/get?foo=bar")jIssue a POST request.Example: j "http://httpbin.org/post" (k [1,2,3]) 4r <- post "http://httpbin.org/post" (toJSON [1,2,3])r ^? responseBody . key "json":Just (Array (fromList [Number 1.0,Number 2.0,Number 3.0]))k)Issue a POST request, using the supplied ,.Example:  let opts = f i > "foo" j ["bar"] k! opts "http://httpbin.org/post" (k [1,2,3]) ,let opts = defaults & param "foo" .~ ["bar"]=r <- postWith opts "http://httpbin.org/post" (toJSON [1,2,3])r ^? responseBody . key "url"/Just (String "http://httpbin.org/post?foo=bar")lIssue a HEAD request.Example: l "http://httpbin.org/get" #r <- head_ "http://httpbin.org/get""r ^? responseHeader "Content-Type"Just "application/json"m)Issue a HEAD request, using the supplied ,.Example:  let opts = f i > "foo" j ["bar"] m opts "http://httpbin.org/get" ,let opts = defaults & param "foo" .~ ["bar"]+r <- headWith opts "http://httpbin.org/get" r ^? responseHeader "Connection"Just "keep-alive"nIssue a PUT request.o(Issue a PUT request, using the supplied ,.pIssue an OPTIONS request.Example: p "http://httpbin.org/get" See a# for a more complex worked example.q-Issue an OPTIONS request, using the supplied ,.Example:  let opts = f i > "foo" j ["bar"] q opts "http://httpbin.org/get" rIssue a DELETE request.Example: r "http://httpbin.org/delete" 'r <- delete "http://httpbin.org/delete" r ^. responseStatus . statusCode200s+Issue a DELETE request, using the supplied ,.Example:  let opts = f i @ j 0 s# opts "http://httpbin.org/delete" $let opts = defaults & redirects .~ 00r <- deleteWith opts "http://httpbin.org/delete" r ^. responseStatus . statusCode200tIssue a custom-method request Example:  t% "PATCH" "http://httpbin.org/patch" 4r <- customMethod "PATCH" "http://httpbin.org/patch" r ^. responseStatus . statusCode200u:Issue a custom request method request, using the supplied ,.Example:  let opts = f i @ j 0 u* "PATCH" opts "http://httpbin.org/patch" $let opts = defaults & redirects .~ 0=r <- customMethodWith "PATCH" opts "http://httpbin.org/patch" r ^. responseStatus . statusCode200xKConvert the body of an HTTP response from JSON to a suitable Haskell type.In this example, we use x in the IO monad, where it will throw a 4 exception if conversion to the desired type fails. ' {-# LANGUAGE DeriveGeneric #-} import  GHC.Generics (/0) {- This Haskell type corresponds to the structure of a response body from httpbin.org. -} data GetBody = GetBody { headers :: 12   , args :: 12   , origin ::  , url ::  } deriving (Show, /0) -- Get GHC to derive a l instance for us. instance l GetBody {- The fact that we want a GetBody below will be inferred by our use of the "headers" accessor function. -} foo = do r <- x =<< g. "http://httpbin.org/get" print (headers (r *  responseBody))  If we use x in the m monad, it will return n with a " payload if conversion fails, and o with a  whose  responseBody# is the converted value on success.y4Convert the body of an HTTP response from JSON to a Value.In this example, we use y in the IO monad, where it will throw a  exception if the conversion to Value fails. foo = do r <- y =<< g% "http://httpbin.org/get" print (r ,  responseBody& . key "headers" . key "User-Agent") zFBasic authentication. This consists of a plain username and password.Example (note the use of TLS):  let opts = f i ; ?~ z "user" "pass" i2 opts "https://httpbin.org/basic-auth/user/pass" Note here the use of the % setter to turn an & into a  &3, to make the type of the RHS compatible with the ; lens.5let opts = defaults & auth ?~ basicAuth "user" "pass"<r <- getWith opts "https://httpbin.org/basic-auth/user/pass"'r ^? responseBody . key "authenticated"Just (Bool True){gAn OAuth2 bearer token. This is treated by many services as the equivalent of a username and password.Example (note the use of TLS):  let opts = f i ; ?~ { "1234abcd" i6 opts "https://public-api.wordpress.com/rest/v1/me/" |A not-quite-standard OAuth2 bearer token (that seems to be used only by GitHub). This will be treated by whatever services accept it as the equivalent of a username and password.Example (note the use of TLS):  let opts = f i ; ?~ | "abcd1234" i% opts "https://api.github.com/user" }AWS v4 request signature.Example (note the use of TLS):  let opts = f i ; ?~ 'awsAuth AWSv4' "key" "secret" i2 opts "https://dynamodb.us-west-2.amazonaws.com" ~Proxy configuration.Example:  let opts = f i : ?~ ~ "localhost" 8000 i opts "http://httpbin.org/get" Note here the use of the % setter to turn a  into a  3, to make the type of the RHS compatible with the : lens.Make a Part whose content is a strict , encoded as UTF-8.The Part? does not have a file name or content type associated with it.Make a Part whose content is a , encoded as UTF-8.The Part? does not have a file name or content type associated with it.ghijklmnopqrstuvwxyz Username. Password.{|}~"Name of the corresponding <input>.The body for this ."Name of the corresponding <input>.The body for this .R $%&,9:;<=>?@ABCDEFGHQSTUVWXYZ[\]^_`abfghijklmnopqrstuvwxyz{|}~Rgijklmpqnorstuvw,f9<>@=?BCA&$%;z{|}:~h]^_`VSUWTXQ YZ[\xyDEFGHabghijklmnopqrstuvwxyz{|}~(c) 2014 Bryan O'Sullivan BSD-stylebos@serpentine.com experimentalGHCNoneHM Create a *, passing it to the given function. The 5 will no longer be valid after that function returns.MThis session manages cookies and uses default session manager configuration.Create a session.This uses the default session manager settings, but does not manage cookies. It is intended for use with REST-like HTTP-based APIs, which typically do not use cookies.SCreate a session, using the given manager settings. This session manages cookies.BCreate a session, using the given cookie jar and manager settings.-specific version of +.-specific version of 3.-specific version of 4.-specific version of 5.-specific version of 6.-specific version of 7.-specific version of .-specific version of 8.-specific version of 9.-specific version of :.-specific version of .-specific version of ;.pIf 7 is specified, no cookie management will be performed.qrst88pqrstu<=><=?<=@<=A<=B<CD<CE<CE<CFGHIJKLM7NO  P Q R R S T U U V W X Y Z [ \ ] ^ _ ` a b c d e f g h h i ( ) j k l m n o pqi()rjsklntmuvwxyz{|}~ST.+384965:7;  &+3456789:;J <C<C<C        q Q  n(     s)nmjik(lzxw}{uy|~vTSsrt !"#$%&!'()*+,-./0123456789:;<..=.>.?.@.A.B.C.D.E.F.G.H.I.J.K.L.M.N.O.P.QRS TUVTUWXYXZX[\]C^_` wreq-0.4.0.0 Network.WreqNetwork.Wreq.LensNetwork.Wreq.Cache.StoreNetwork.Wreq.SessionNetwork.Wreq.TypesNetwork.Wreq.CacheNetwork.Wreq.Lens.Machinery Paths_wreqNetwork.Wreq.Internal.TypesasJSONasValueData.Text.LazyTextgetWithputWithNetwork.HTTP.Client withManagerdefaultsdefaultManagerSettings basicAuth HttpExceptionTooManyRedirectsSessionNetwork.Wreq.Internal.LensNetwork.Wreq.Internal.AWSNetwork.Wreq.Internal.LinkNetwork.Wreq.Lens.THOpenSSL.Sessioncontext Control.Lens&.~Network.HTTP.Client.OpenSSLopensslManagerSettings withOpenSSLmanagerResponseTimeout?~ httpProxyLensproxyauth^.get^?^..Network.Wreq.Internal GHC.GenericsGenericData.MapMapposthead_optionsputdeletepostWithheadWith optionsWith deleteWithhttp-client-0.4.11.2%Network.HTTP.Client.MultipartFormDatapartFileSourcepartFilepartLBSpartBSPartNetwork.HTTP.Client.TypesCookieProxyResponsehttp-types-0.8.6Network.HTTP.Types.StatusStatusStoreemptyinsertlookupfromListtoListRunReqLinklinkURL linkParams JSONError FormParam:= FormValuerenderFormValuePayloadRawPutable putPayloadPostable postPayloadAWSAuthVersionAWSv4AuthAWSAuth OAuth2Token OAuth2Bearer BasicAuth StatusCheckerOptionsmanagerheadersparams redirectscookies checkStatus ContentTypereqURLseshRunheaderparamcookie cookieName cookieValuecookieExpiryTime cookieDomain cookiePathcookieCreationTimecookieLastAccessTimecookiePersistentcookieHostOnlycookieSecureOnlycookieHttpOnly proxyHost proxyPortresponseStatusresponseVersionresponseHeaderresponseHeaders responseLink responseBodyresponseCookieresponseCookieJar statusCode statusMessagepartName partFileNamepartContentType partGetBodyattoatto_ cacheStore validateEntry shouldCache customMethodcustomMethodWithfoldGet foldGetWith oauth2Bearer oauth2TokenawsAuthpartText partString withSessionwithAPISessionwithSessionWithwithSessionControl defaultRules fieldName makeLenses toCamelCasecatchIOversionbindirlibdirdatadir libexecdir sysconfdir getBinDir getLibDir getDataDir getLibexecDir getSysconfDirgetDataFileNamecapacitysizeepochpsqEpoch $fShowStorebaseGHC.BaseString text-1.2.0.4Data.Text.Internal Data.MaybeMaybeNothingManagerManagerSettingsRequestBody ReaderBody StringBodyNoBody CacheEntry entryCreated entryExpires entryResponse seshCookies seshManagerMgr$fShowCacheEntry $fShowSession$fExceptionJSONError$fShowFormParam $fShowOptions setHeadermaybeSetHeader cookieJar decompressgetConnectionWrapperhost hostAddressmethodonRequestBodyExceptionpathport queryStringrawBody redirectCount requestBodyrequestHeadersrequestVersionresponseTimeoutsecureassocassoc2 deleteKey signRequest signRequestV4 payloadHashserviceAndRegionremoveRunscopepayload$fFormValueMaybe $fFormValue()$fFormValueDouble$fFormValueFloat$fFormValueWord64$fFormValueWord32$fFormValueWord16$fFormValueWord8$fFormValueWord$fFormValueInteger$fFormValueInt64$fFormValueInt32$fFormValueInt16$fFormValueInt8$fFormValueInt$fFormValueByteString$fFormValueByteString0 $fFormValue[]$fFormValueBuilder$fFormValueText$fFormValueText0$fPutableValue$fPutableByteString$fPutableByteString0$fPutablePayload$fPostableValue$fPostableByteString$fPostableByteString0$fPostablePayload$fPostableFormParam $fPostable[] $fPostable(,) $fPostable[]0 $fPostable[]1$fPostablePartQuot BackslashLiterallinkslink quotedString paramNameresponseClose' partFilename partHeaders _CookieJar lens-4.9.1Control.Lens.Type Traversal'attoparsec-0.12.1.6#Data.Attoparsec.ByteString.InternalParserFoldControl.Applicative<*Data.Attoparsec.Internal endOfInput CacheResponse ExtensionSMaxAgeMaxAgeProxyRevalidateMustRevalidate NoTransformNoStoreNoCachePrivatePublicSecondscacheableStatusescacheableMethodspossiblyCacheablecomputeExpirationsimplifyCacheResponseparseCacheResponse parseDate$fHashableCacheResponse setRedirectsemptyMethodWithignoreResponse readResponsefoldResponseBodyrequestrunpreparesetQuerysetAuthsetProxysetCheckStatus prepareGetrunRead preparePost prepareMethod prepareHead runIgnoreprepareOptions preparePut prepareDeleteControl.Lens.LensControl.Lens.Setter aeson-0.8.0.2Data.Aeson.Types.ClasstoJSONFromJSON Data.EitherEitherLeftRightMappingrunWithstringignore