HTTP-4000.2.18: A library for client-side HTTP

Portabilitynon-portable (not tested)
Stabilityexperimental
MaintainerGanesh Sittampalam <ganesh@earth.li>
Safe HaskellNone

Network.HTTP.Stream

Description

Transmitting HTTP requests and responses holding String in their payload bodies. This is one of the implementation modules for the Network.HTTP interface, representing request and response content as Strings and transmitting them in non-packed form (cf. Network.HTTP.HandleStream and its use of ByteStrings.) over Stream handles. It is mostly here for backwards compatibility, representing how requests and responses were transmitted up until the 4.x releases of the HTTP package.

For more detailed information about what the individual exports do, please consult the documentation for Network.HTTP. Notice however that the functions here do not perform any kind of normalization prior to transmission (or receipt); you are responsible for doing any such yourself, or, if you prefer, just switch to using Network.HTTP function instead.

Synopsis

Documentation

simpleHTTP :: Request_String -> IO (Result Response_String)Source

Simple way to transmit a resource across a non-persistent connection.

simpleHTTP_ :: Stream s => s -> Request_String -> IO (Result Response_String)Source

Like simpleHTTP, but acting on an already opened stream.

receiveHTTP :: Stream s => s -> IO (Result Request_String)Source

Receive and parse a HTTP request from the given Stream. Should be used for server side interactions.

respondHTTP :: Stream s => s -> Response_String -> IO ()Source

Very simple function, send a HTTP response over the given stream. This could be improved on to use different transfer types.