get
Consumes and returns the next character. Fails if there is no input
left.
Consumes and returns the next character. Fails if there is no input
left.
Return the state from the internals of the monad.
Fetch the current value of the state within the monad.
Fetch the current value of the state within the monad.
Fetch the current value of the state within the monad.
Decode a value in the Get monad
Decode a value in the Get monad
Decode a value in the Get monad
Decode a value in the Get monad
Get a record by identifier, if available.
Example usage
With
schema-1 and
dataset-1,
getSpj :: MonadIO m => ReaderT SqlBackend m (Maybe User)
getSpj = get spjId
mspj <- getSpj
The above query when applied on
dataset-1, will get this:
+------+-----+
| name | age |
+------+-----+
| SPJ | 40 |
+------+-----+
Issue a GET request.
Example:
get "http://httpbin.org/get"
>>> r <- get "http://httpbin.org/get"
>>> r ^. responseStatus . statusCode
200
Get an Attr of an object.
Builds an HTTP "GET" request with the given query parameters.
Example:
ghci> :set -XOverloadedStrings
ghci> import qualified Data.Map as M
ghci> buildRequest $ get "/foo/bar" (M.fromList [("param0", ["baz", "quux"])])
GET /foo/bar?param0=baz¶m0=quux HTTP/1.1
host: localhost
sn="localhost" c=127.0.0.1:60000 s=127.0.0.1:8080 ctx=/ clen=n/a
params: param0: ["baz","quux"]
Get the value of an attribute for an object.
Retrieves the value of an option.