Skip to content
FutureBlitz

    Install

    Import std.net.http.server

    HttpRequest

    std.net.http.server

    class

    Public Class HttpRequest

    A request a server read: its method, its Verb, as the client wrote it, like "GET" (Method is a keyword); its target, and the target's path, percent-encoded, without dot segments, and query; its headers and body; the path parameters its route bound; and the client's address.

    std/net/http/server.fb, line 73

    • Public ReadOnly Field Verb: String field #

      Its method, as the client wrote it, like "GET".

    • Public ReadOnly Field Target: String field #

      Its target, as the client wrote it.

    • Public ReadOnly Field Path: String field #

      Its target's path, percent-encoded, without dot segments.

    • Public ReadOnly Field Query: QueryParams field #

      Its target's query.

    • Public ReadOnly Field Headers: Headers field #

      Its headers.

    • Public ReadOnly Field Bytes: UInt8[] field #

      Its body's bytes.

    • Public ReadOnly Field Version: String field #

      "HTTP/1.1" or "HTTP/1.0".

    • Public ReadOnly Field RemoteAddress: String field #

      The client's address.

    • Public Property Text: String property #

      The body as text, its UTF-8, with U+FFFD for each byte that doesn't start well-formed UTF-8.

    • Public Method Param(name: String): String? method #

      A path parameter its route bound, percent-decoded, like :id's, or Null when it has none of that name.

    • Public Property Params: Map<String, String> property #

      Each path parameter its route bound, by name.

    • Public Method Form(): QueryParams method #

      A form's fields, when the body is application/x-www-form-urlencoded, as a browser sends them, or none.

    Report an issue with this page or with FutureBlitz on GitHub.