put
Construct a
Put action. In contrast to
BuildSteps,
Puts are referentially transparent in the sense that sequencing
the same
Put multiple times yields every time the same value
with the same side-effect.
Replace the state inside the monad.
put s sets the state within the monad to
s.
put s sets the state within the monad to
s.
put s sets the state within the monad to
s.
Encode a value in the Put monad.
Encode a value in the Put monad.
Replace the current chunk.
Encode a value in the Put monad.
Encode a value in the Put monad.
Builds an HTTP "PUT" request.
Example:
ghci> :set -XOverloadedStrings
ghci> buildRequest $ put "/foo/bar" "text/plain" "some text"
PUT /foo/bar HTTP/1.1
content-type: text/plain
content-length: 9
host: localhost
sn="localhost" c=127.0.0.1:60000 s=127.0.0.1:8080 ctx=/ clen=9
Perform a PUT request to the application under test.
Place content on the server at the given URL via an HTTP PUT request,
specifying the content type and a function to write the content to the
supplied
OutputStream. You might see:
put "http://s3.example.com/bucket42/object149" "text/plain"
(fileBody "hello.txt") (\p i -> do
putStr $ show p
Streams.connect i stdout)