Skip to main content

Request.new

Request.newmethodurlheadersbody

Documentation

Create new HTTP request.

Arguments

  • method: The HTTP method represented by the request.
  • url: The address for the request.
  • headers: A vector containing headers for the request.
  • body: The body of the request.

Examples

Create a new post request with no headers and no body.

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

example_new = Request.new Method.Post (URI.parse "http://example.com")