Standard library
HTTP request
HTTP request product shape.
Introduction
HTTP request product shape. Import std/net/request to bind the module as request. Call free functions as request.name(...). Struct methods use a receiver value.
/ std/net/request
This page is the package reference for std/net/request. Private helpers used only by co-located tests are not listed.
Struct · request
HTTP request shape and helpers. The shape is exported as request.request. Methods on the receiver are listed next.
/ std/net/request
; shape: request.request
; see std/net/http parse_request
Parameters: No parameters. Type or shape export. Returns: Shape export used for literals and methods.
request · is_get
Reports whether the request method is GET. Call form: request.is_get().
/ std/net/request
$ ok = req.is_get()
Parameters: No parameters. Returns: Boolean.
request · is_post
Reports whether the request method is POST. Call form: request.is_post().
/ std/net/request
$ ok = req.is_post()
Parameters: No parameters. Returns: Boolean.
request · has_body
Reports whether the request body string is non-empty. Call form: request.has_body().
/ std/net/request
$ ok = req.has_body()
Parameters: No parameters. Returns: Boolean.