njs/request

Types

pub type Request
pub type RequestOption(h) {
  RequestOption(body: BitArray, headers: h, method: String)
  EmptyRequestOption(headers: h, method: String)
}

Constructors

  • RequestOption(body: BitArray, headers: h, method: String)
  • EmptyRequestOption(headers: h, method: String)

Functions

pub fn array_buffer(request r: Request) -> Promise(ArrayBuffer)
pub fn from_request(request r: Request, option o: a) -> Request
pub fn from_url(url u: String, option o: a) -> Request
pub fn has_body(request r: Request) -> Bool
pub fn headers(request r: Request) -> Headers
pub fn json(request r: Request) -> Promise(Json)
pub fn method(request r: Request) -> String
pub fn text(request r: Request) -> Promise(String)
pub fn url(request r: Request) -> String
Search Document