úÎ!=:9B9      !"#$%&'()*+,-./012345678None 7¶(uhttpcRFC2616 sec 5.1.1 Methoduhttpc status codeuhttpc$whether server keeps connection openuhttpccontent lengthuhttpclist of header lines w/o CRLFuhttpclist of chunksuhttpc,transfer-encoding/content-length informationuhttpcidentity w/ content lengthuhttpcchunked transferuhttpcHTTP status codeuhttpcPMinimal socket input-stream abstraction w/ single pushback & consumed byte-countHThis abstraction is inspired by io-streams but is tuned for low-overheaduhttpc@Return the time as the number of microseconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC).Note: this function returns 0 in case the underlying gettimeofday(2) call fails. See also uhttpc^Return the time as the number of seconds (with up to microsecond precision) since the Epoch, 1970-01-01 00:00:00 +0000 (UTC).QThis is a faster implementation the code below useful for benchmarking purposes. zimport Data.Time.Clock.POSIX (getPOSIXTime) getPOSIXTimeSecs :: IO Double getPOSIXTimeSecs = fmap realToFrac getPOSIXTimeNote: this function returns NaN in case the underlying gettimeofday(2) call fails.9uhttpcInternal debug tracing helperuhttpcConvert an existing : into a uhttpcAccess underlying :uhttpcAccess  counter id Each created 2 wrapper has an unique counter id value associateduhttpc!Wrapper that creates TCP/IP IPv4  SocketStream and connects to ; created with )If provided, the Maybe SockAddrJ argument allows to locally bind the socket to a specific source address. uhttpcRead data from stream.<Note: Returns empty string on EOF. It's often better to use ! instead.!uhttpc Version of   that throws on EOF"uhttpc Version of  ) which does not consume the data returned That is,  ssPeek ss is semantically equivalent to -do { b <- ssRead ss; ssUnRead b ss; return b}." is idempotent, i.e. #ssPeek ss == ssPeek ss >> ssPeek ss#uhttpc8May return empty string if no data has been buffered yet$uhttpcRead exactly n bytes from  SocketStream*; throws exception if connection is closed%uhttpcPush-back read data into &uhttpc*Returns length of data consumed (i.e. w/o % data)'uhttpcWrite data out to socket (uses < internally)(uhttpc(Returns length of data written to stream=uhttpcUsed by )uhttpcConstruct IPv4 ;*uhttpc9Extract information from the header lines as returned by +7returns: (status-code, close-conn, Just content-length or Nothing (i.e. chunked))+uhttpc#Receive/consume HTTP response from If no exception occured during + the J is left at the beginning of the (potentially empty) HTTP response body.,uhttpcReceive full HTTP response-uhttpcReceive single HTTP chunk.uhttpc,Split HTTP URL into (hostname,port,url-path)/uhttpc#Construct general HTTP/1.1 request.0uhttpcConstruct HTTP/1.1 GET request. See /( for constructing more general requests.>uhttpc? meets @AuhttpcTag the B value of a CDuhttpc Alias for EFuhttpc%Strip one trailing CR if there is oneuhttpcRFC2616 sec 4.2 message-header (e.g. "Content-Type: text/plain"uhttpcRFC2616 sec 14.3 host [ ":" port ] (e.g. "localhost:8001")uhttpcRFC2616 sec 5.1.2  Request-URI (e.g. "pub index.html")/uhttpcif False sets Connection: close headeruhttpcadditional HTTP request headersuhttpcoptional request bodyuhttpcRequest constructed as a G ready to be sent over the wire1  !"#$%&'()*+,-./01 "#!$%'&(  /0,+*-).H      !"#$%&'()*+,-./0123456789:;<=;<>;?@ABCDECFGHCIJCIKLCMNOPQRS%uhttpc-0.1.1.1-6DKRQyfi3MOD6vEYuP5UPeNetwork.HTTP.MicroClient MsgHeaderHostPortReqURIMethodGETPOSTHEADPUTDELETETRACECONNECTOPTIONS HttpResponserespCode respKeepaliverespContentLen respHeader respContentTransferEncoding TeIdentity TeChunked TeInvalidHttpCode SockStreamgetPOSIXTimeUSecsgetPOSIXTimeSecs ssFromSocket ssToSocketssIdssClose ssConnectssReadssRead'ssPeek ssPeekBufssReadNssUnRead ssReadCntssWrite ssWriteCnt getSockAddrhttpHeaderGetInfosrecvHttpHeadersrecvHttpResponse recvChunksplitUrl mkHttp11ReqmkHttp11GetReq$fNFDataTransferEncoding$fNFDataHttpResponse$fShowTransferEncoding$fEqTransferEncoding $fShowMethod $fEqMethod $fEnumMethod$fShowHttpResponsessDebug&network-3.1.0.0-DH2jfvb4nAO8RR4tKibx4BNetwork.Socket.TypesSocketSockAddrNetwork.Socket.ByteString.IOsendAll tcpProtoNumwhenJustbaseGHC.Basewhen Data.Maybemaybenote GHC.MaybeNothingMaybefIGHC.Real fromIntegralstripCRbytestring-0.10.8.2Data.ByteString.Internal ByteString