Skip to main content

Request.with_body

with_bodynew_body

Documentation

Set the body for the request.

Arguments

  • new_body: The body to insert into the request.

Examples

Unsetting the body in a post request.

     import Standard.Base.Network.HTTP.Request.Request
import Standard.Base.Network.HTTP.Request_Body.Request_Body
import Standard.Base.Network.URI.URI

example_with_body =
Request.post (URI.parse "http://example.com") Request_Body.Empty |> _.with_body Request_Body.Empty