Hoogle Search

Within LTS Haskell 24.52 (ghc-9.10.3)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. MultipartPostRequest :: MultipartParams -> RequestType

    snap-core Snap.Test

    No documentation available.

  2. data RequestBuilder (m :: Type -> Type) a

    snap-core Snap.Test

    RequestBuilder is a monad transformer that allows you to conveniently build a snap Request for testing.

  3. data RequestType

    snap-core Snap.Test

    The RequestType datatype enumerates the different kinds of HTTP requests you can generate using the testing interface. Most users will prefer to use the get, postUrlEncoded, postMultipart, put, and delete convenience functions.

  4. RequestWithRawBody :: Method -> ByteString -> RequestType

    snap-core Snap.Test

    No documentation available.

  5. UrlEncodedPostRequest :: Params -> RequestType

    snap-core Snap.Test

    No documentation available.

  6. buildRequest :: MonadIO m => RequestBuilder m () -> m Request

    snap-core Snap.Test

    Runs a RequestBuilder, producing the desired Request. N.B. please don't use the request you get here in a real Snap application; things will probably break. Don't say you weren't warned :-) Example:

    ghci> :set -XOverloadedStrings
    ghci> import qualified Data.Map as M
    ghci> buildRequest $ get "/foo/bar" M.empty
    GET /foo/bar HTTP/1.1
    host: localhost
    
    sn="localhost" c=127.0.0.1:60000 s=127.0.0.1:8080 ctx=/ clen=n/a
    

  7. requestToString :: Request -> IO ByteString

    snap-core Snap.Test

    Converts the given Request to a bytestring. Since: 1.0.0.0 Example:

    ghci> :set -XOverloadedStrings
    ghci> import qualified Data.Map as M
    ghci> r <- buildRequest $ get "/foo/bar" M.empty
    ghci> requestToString r
    "GET /foo/bar HTTP/1.1\r\nhost: localhost\r\n\r\n"
    

  8. setRequestPath :: forall (m :: Type -> Type) . Monad m => ByteString -> RequestBuilder m ()

    snap-core Snap.Test

    Sets the request's path. The path provided must begin with a "/" and must not contain a query string; if you want to provide a query string in your test request, you must use setQueryString or setQueryStringRaw. Note that rqContextPath is never set by any RequestBuilder function. Example:

    ghci> :set -XOverloadedStrings
    ghci> import qualified Data.Map as M
    ghci> buildRequest $ get "/foo/bar" M.empty >> setRequestPath "/bar/foo"
    GET /bar/foo HTTP/1.1
    host: localhost
    
    sn="localhost" c=127.0.0.1:60000 s=127.0.0.1:8080 ctx=/ clen=n/a
    

  9. setRequestType :: forall (m :: Type -> Type) . MonadIO m => RequestType -> RequestBuilder m ()

    snap-core Snap.Test

    Sets the type of the Request being built. Example:

    ghci> :set -XOverloadedStrings
    ghci> import qualified Data.Map as M
    ghci> buildRequest $ delete "/foo/bar" M.empty >> setRequestType GetRequest
    GET /foo/bar HTTP/1.1
    host: localhost
    
    sn="localhost" c=127.0.0.1:60000 s=127.0.0.1:8080 ctx=/ clen=n/a
    

  10. serializeQuery :: URINormalizationOptions -> Query -> Builder

    uri-bytestring URI.ByteString

    Serialize the query part of a url serializeQuery opts mempty = "" serializeQuery opts (Query [("a","b"),("c","d")]) = "?a=b&c=d"

Page 325 of many | Previous | Next