Copyright | See LICENSE file |
---|---|
License | BSD |
Maintainer | Ganesh Sittampalam <ganesh@earth.li> |
Stability | experimental |
Portability | non-portable (not tested) |
Safe Haskell | None |
Language | Haskell98 |
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 String
s and transmitting them in non-packed form
(cf. Network.HTTP.HandleStream and its use of ByteString
s.) 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.
- module Network.Stream
- simpleHTTP :: Request_String -> IO (Result Response_String)
- simpleHTTP_ :: Stream s => s -> Request_String -> IO (Result Response_String)
- sendHTTP :: Stream s => s -> Request_String -> IO (Result Response_String)
- sendHTTP_notify :: Stream s => s -> Request_String -> IO () -> IO (Result Response_String)
- receiveHTTP :: Stream s => s -> IO (Result Request_String)
- respondHTTP :: Stream s => s -> Response_String -> IO ()
Documentation
module Network.Stream
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.
sendHTTP :: Stream s => s -> Request_String -> IO (Result Response_String) Source
sendHTTP_notify :: Stream s => s -> Request_String -> IO () -> IO (Result Response_String) Source
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.