!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ Nonerequest method  status code None#8A simple representation of the HTTP response created by  lbsConsumer. Status code of the response. !HTTP version used by the server. %Response headers sent by the server. "Response body sent by the server. @Cookies set on the client after interacting with the server. If ' cookies have been disabled by setting * to Nothing, then  this will always be empty. BReleases any resource held by this response. If the response body C has not been fully read yet, doing so after this call will likely  be impossible. KAll information on how to connect to a host and what should be sent in the  HTTP request. /If you simply wish to download from a URL, see parseUrl. KThe constructor for this data type is not exposed. Instead, you should use  either the + method to retrieve a default instance, or parseUrl to M construct from a URL, and then use the records below to make modifications. H This approach allows http-conduit to add configuration options without # breaking backwards compatibility. GFor example, to construct a POST request, you could do something like:  3 initReq <- parseUrl "http://www.example.com/path"  let req = initReq  { method = "POST"  } !For more information, please see   +http://www.yesodweb.com/book/settings-types. #HTTP request method, eg GET, POST.  Whether to use HTTPS (ie, SSL). .Everything from the host to the query string. Custom HTTP request headers CAs already stated in the introduction, the Content-Length and Host I headers are set automatically by this module, and shall not be added to  requestHeaders. CMoreover, the Accept-Encoding header is set implicitly to gzip for H convenience by default. This behaviour can be overridden if needed, by J setting the header explicitly to a different value. In order to omit the 6 Accept-Header altogether, set it to the empty string "". If you need an J empty Accept-Header (i.e. requesting the identity encoding), set it to a $ non-empty white-space string, e.g. " " . See RFC 2616 section 14.3 for J details about the semantics of the Accept-Header field. If you request a H content-encoding not supported by this module, you will have to decode  it yourself (see also the % field). ENote: Multiple header fields with the same field-name will result in 3 multiple header fields being sent and therefore it's the responsibility G of the client code to ensure that the rules from RFC 2616 section 4.2  are honoured. "Optional HTTP proxy. # Optional resolved host address.  Since 1.8.9 $If True, a chunked and/or gzipped body will not be  decoded. Use with caution. %4Predicate to specify whether gzipped data should be  decompressed on the fly (see alwaysDecompress and  browserDecompress). Default: browserDecompress. &EHow many redirects to follow when getting a resource. 0 means follow " no redirects. Default value: 10. 'GCheck the status code. Note that this will run after all redirects are  performed. Default: return a StatusCodeException on non-2XX responses. (2Number of microseconds to wait for a response. If Nothing , will wait # indefinitely. Default: 5 seconds. )DWraps the calls for getting new connections. This can be useful for G instituting some kind of timeouts. The first argument is the value of  responseTimeout3. Second argument is the exception to be thrown on  failure.  Default: If responseTimeout is Nothing, does nothing. Otherwise, 4 institutes timeout, and returns remaining time for responseTimeout.  Since 1.8.8 *A user-defined cookie jar.  If &, no cookie handling will take place, "Cookie" headers  in   will be sent raw, and  will be  empty.  Since 1.9.0 .When using one of the  RequestBodySource / RequestBodySourceChunked constructors,  you must ensure  that the Source- can be called multiple times. Usually this  is not a problem. The RequestBodySourceChunked will send a chunked request 8 body, note that not all servers support this. Only use  RequestBodySourceChunked if you know the server you're - sending to supports chunked request bodies. 4?Define a HTTP proxy, consisting of a hostname and port number. 6!The host name of the HTTP proxy. 7#The port number of the HTTP proxy. J Since 1.9.4 K Expected size/ actual size.  Since 1.9.4 Ohost/port Thost/port Z*Response containing unparseable redirect. [List of encountered responses containing redirects in reverse chronological order; including last redirect, which triggered the exception and was not followed. bIf no more data, return empty. c"Return data to be read next time. dSend data to server  Since 1.9 m  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghd  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghd`abcde^_H]\[ZYXWVUTSRQPONMLKJI;<=>?@ABCDEFG89:4567.3210/fg-,+ !"#$%&'()* h  !"#$%&'()*+,-.3210/456789:; <=>?@ABCDEFGH]\[ZYXWVUTSRQPONMLKJI^_`abcdefghNoneq For testing ijklmnopqinput conn, output, input rread write close sthost port u ijklmnopqrstu ijkonmlpqrstu ijklmnopqrstuNone vwxyz{|}~ send headers vwxyz{|}~ vwxyz{|}~ vwxyz{|}~None Convert a URL into a . $This defaults some of the values in , such as setting  to  GET and   to []. Since this function uses +, the return monad can be anything that is  an instance of  , such as  or . Add a ? to the request. If it is absolute (includes a host name), add  it as per 9; if it is relative, merge it with the existing request.  Extract a  from the request.  Validate a , then add it to the request. Magic value to be placed in a $ to indicate that we should use the  timeout value in the Manager.  Since 1.9.3 'Always decompress a compressed stream. :Decompress a compressed stream unless the content-type is 'application/x-tar'. KAdd a Basic Auth header (with the specified user name and password) to the ' given Request. Ignore error handling: applyBasicAuth user pass $ fromJust $ parseUrl url FAdd a proxy to the Request so that the Request when executed will use  the provided proxy. "Add url-encoded parameters to the . This sets a new !), adds a content-type request header and  changes the  to POST. response headers NoneNoneConnKey& consists of a hostname, a port and a Bool  specifying whether to use SSL. #Hostname or resolved host address. 0Keeps track of open connections for keep-alive. ( If possible, you should share a single ( between multiple threads and requests. Nothing' indicates that the manager is closed. This is a per-ConnKey value.  Copied from  Settings for a Manager. Please use the  function and then modify  individual settings. CNumber of connections to a single host to keep alive. Default: 10. Create an insecure connection. YCreate a TLS connection. Default behavior: throw an exception that TLS is not supported. EDefault timeout (in microseconds) to be applied to requests which do  not provide a timeout value. Default is 5 seconds  Since 1.9.3 GExceptions for which we should retry our request if we were reusing an G already open connection. In the case of IOExceptions, for example, we J assume that the connection was closed on the server and therefore open a  new one. DAdd a new element to the list, up to the given maximum number. If we're ; already at the maximum, return the new value as leftover.  Create a . You must manually call  to shut it down. Creating a new 5 is an expensive operation, you are advised to share  a single  between requests instead. +Collect and destroy any stale connections. Close all connections in a . Afterwards, the   can be reused if desired. Note that this doesn'*t affect currently in-flight connections, C meaning you can safely use it without hurting any queries you may  have concurrently running. !This function needs to acquire a ConnInfo- either from the Manager or  via I/O, and register it with the  ResourceT so it is guaranteed to be - either released or returned to the manager. ICreate an exception to be thrown if the connection for the given request  fails. ) NoneJIf a request is a redirection (status code 3xx) this function will create J a new request from the old request, the server headers returned with the E redirection, and the redirection code itself. This function returns  ' if the code is not a 3xx, there is no location header included, or if the  redirected response couldn't be parsed with . JIf a user of this library wants to know the url chain that results from a N specific request, that user has to re-implement the redirect-following logic 6 themselves. An example of that might look like this:  myHttp req man = do 2 (res, redirectRequests) <- (`runStateT` []) $  'httpRedirect'  9000  (\req' -> do 6 res <- http req'{redirectCount=0} man , modify (\rqs -> req' : rqs)  return (res, getRedirectedRequest req' (responseHeaders res) (responseCookieJar res) (W.statusCode (responseStatus res))  )  'lift'  req + applyCheckStatus (checkStatus req) res  return redirectRequests  Convert a  that has a Source body to one with a lazy   body.      None 8This corresponds to the subcomponent algorithm entitled "Domain Matching" detailed  in section 5.1.3 8This corresponds to the subcomponent algorithm entitled "Paths" detailed  in section 5.1.4 8This corresponds to the subcomponent algorithm entitled " Path-Match" detailed  in section 5.1.4 8Are we configured to reject cookies for domains such as "com"? DThis corresponds to the eviction algorithm described in Section 5.3 " Storage Model" This applies the  to a given Request ;This corresponds to the algorithm described in Section 5.4 "The Cookie Header"  This applies  to a given Response ;This corresponds to the algorithm described in Section 5.3 " Storage Model" # This function consists of calling  followed by . 4 Use this function if you plan to do both in a row.   and 2 are only provided for more fine-grained control. SInsert a cookie created by generateCookie into the cookie jar (or not if it shouldn't be allowed in) /Turn a SetCookie into a Cookie, if it is valid Input cookie jar Value that should be used as "now" Filtered cookie jar The request to insert into Current cookie jar Value that should be used as "now" C(Ouptut request, Updated cookie jar (last-access-time is updated)) Input request Current cookie jar Value that should be used as "now" .Whether or not this request is coming from an "http"/ source (not javascript or anything like that) (Contents of a "Cookie"; header, Updated cookie jar (last-access-time is updated)) Response received from server %Request which generated the response Value that should be used as "now" Current cookie jar Q(Updated cookie jar with cookies from the Response, The response stripped of any " Set-Cookie" header) The  the cookie jar is receiving :The request that originated the response that yielded the  Value that should be used as "now" .Whether or not this request is coming from an "http"/ source (not javascript or anything like that) Input cookie jar to modify Updated cookie jar The  the cookie jar is receiving Input cookie jar to modify .Whether or not this request is coming from an "http"/ source (not javascript or anything like that) Updated (or not) cookie jar The  we are encountering :The request that originated the response that yielded the  Value that should be used as "now" .Whether or not this request is coming from an "http"/ source (not javascript or anything like that) The optional output cookie  NoneGet a ! without any redirect following. <The most low-level function for initiating an HTTP request. ?The first argument to this function gives a full specification = on the request: the host to connect to, whether to use SSL,  headers, etc. Please see  for full details. The ! second argument specifies which  should be used. This function then returns a  with a    . The  contains the status code 0 and headers that were sent back to us, and the    ) contains the body of the request. Note  that this    allows you to have fully = interleaved IO actions during your HTTP download, making it ? possible to download very large responses in constant memory. , You may also directly connect the returned     into a   $, perhaps a file or another socket. LAn important note: the response body returned by this function represents a M live HTTP connection. As such, if you do not use the response body, an open . socket will be retained until the containing  ResourceT block exits. If you K do not need the response body, it is recommended that you explicitly shut 5 down the connection immediately, using the pattern:  ! responseBody res $$+- return () HAs a more thorough example, consider the following program. Without the N explicit response body closing, the program will run out of file descriptors G around the 1000th request (depending on the operating system limits).  - import Control.Monad (replicateM_) ( import Control.Monad.IO.Class (liftIO) ( import Data.Conduit (($$+-)) / import Network (withSocketsDo)  import Network.HTTP.Conduit  5 main = withSocketsDo $ withManager $ \manager -> do ) req <- parseUrl "http://localhost/" * mapM_ (worker manager req) [1..5000]   worker manager req i = do  res <- http req manager ; responseBody res $$+- return () -- The important line , liftIO $ print (i, responseStatus res) INote: Unlike previous versions, this function will perform redirects, as  specified by the & setting. Apply  'Request'\'s '( and return resulting exception if any. Redirect loop & _function which performs a request and returns a response, and possibly another request if there's a redirect.  !"#$%&''()*+,-./0123456789:;<=>?@ABBCDEFGHHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijjkklmnopqrstuvwxyz{|}~ http-client-0.1.0.0Network.HTTP.Client.UtilNetwork.HTTP.Client.TypesNetwork.HTTP.Client.ConnectionNetwork.HTTP.Client.BodyNetwork.HTTP.Client.RequestNetwork.HTTP.Client.HeadersNetwork.HTTP.Client.ManagerNetwork.HTTP.Client.ResponseNetwork.HTTP.Client.CookiesNetwork.HTTP.ClientCSourceSinkbytestring-0.10.0.2Data.ByteString.Lazy fromStrictData.ByteStringhGetSome<>readDec hasNoBody ResponseCloserunResponseCloseResponseresponseStatusresponseVersionresponseHeaders responseBodyresponseCookieJarresponseClose' ManagedConnReusedFresh ConnRelease ConnReuse DontReuseReuse ContentTypeRequestmethodsecurehostportpath queryStringrequestHeaders requestBodyproxy hostAddressrawBody decompress redirectCount checkStatusresponseTimeoutgetConnectionWrapper cookieJar GivesPopper NeedsPopperPopper RequestBodyRequestBodyStreamChunkedRequestBodyStreamRequestBodyBuilder RequestBodyBSRequestBodyLBSProxy proxyHost proxyPort CookieJarCJexposeCookie cookie_name cookie_valuecookie_expiry_time cookie_domain cookie_pathcookie_creation_timecookie_last_access_timecookie_persistentcookie_host_onlycookie_secure_onlycookie_http_only HttpExceptionIncompleteHeadersInvalidChunkHeadersResponseBodyTooShortTlsNotSupported TlsExceptionNoResponseDataReceivedProxyConnectExceptionInternalIOException InvalidHeaderInvalidStatusLineExpectedBlankAfter100ContinueFailedConnectionExceptionResponseTimeoutOverlongHeadersHandshakeFailedHttpParserExceptionTooManyRetriesUnparseableRedirectTooManyRedirectsInvalidUrlExceptionStatusCodeException StatusHeaders ConnectionconnectionReadconnectionUnreadconnectionWriteconnectionClosesimplifybuilderToStream responseCloseconnectionReadLineconnectionReadLineWithcharLFcharCR charSpace charColon charPeriodkillCRdummyConnectionmakeConnectionsocketConnectionopenSocketConnectionfirstSuccessful BodyReaderbrRead brComplete brReadSomebrEmpty brAddCleanup brConsumemakeGzipReadermakeUnlimitedReadermakeLengthReadermakeChunkedReaderparseUrlsetUriRelativegetUrisetUriuseDefaultTimeoutalwaysDecompressbrowserDecompressapplyBasicAuthaddProxyurlEncodedBody needsGunziprequestBuilderparseStatusHeadersConnKeyConnHost HostAddressHostNameManagermResponseTimeoutmRetryableExceptionmWrapIOExceptionManagerSettingsmanagerConnCountmanagerRawConnectionmanagerTlsConnectionmanagerResponseTimeoutmanagerRetryableExceptionmanagerWrapIOExceptiondefaultManagerSettings newManager closeManagerfailedConnectionExceptiongetConngetRedirectedRequest lbsResponse getResponseslash isIpAddress domainMatches defaultPath pathMatchescreateCookieJardestroyCookieJarinsertIntoCookieJar!removeExistingCookieFromCookieJarrejectPublicSuffixesisPublicSuffixevictExpiredCookiesinsertCookiesIntoRequestcomputeCookieStringupdateCookieJarreceiveSetCookieinsertCheckedCookiegenerateCookie withResponsehttpLbshttpRaw responseOpenapplyCheckStatus httpRedirectdata-default-class-0.0.1Data.Default.Classdefbase Data.MaybeNothing$fMonoidCookieJar$fEqResponseClose$fShowResponseClose$fMonoidRequestBody $fEqCookieJar$fDefaultCookieJar $fOrdCookie $fEqCookie$fExceptionHttpExceptionfailure-0.2.0.1Control.FailureFailureghc-prim GHC.TypesIOMaybenetwork-2.4.1.2 Network.URIURI$fIsStringRequest$fDefaultRequest $fShowRequestmConns mMaxConns addToListreapgetManagedConn NonEmptyListConsOnemRawConnectionmTlsConnection takeSocket putSocketneToList neFromList closeManager' safeConnClose nonEmptyMapM_ getConnDestData.ByteString.Lazy.Internal ByteStringcookie-0.4.0.1 Web.Cookie SetCookie