Documentation

Std.Http.Data.Method

Method #

This module provides the Method type that represents HTTP request methods. It defines all IANA-registered HTTP methods as distinct constructors, including standard methods (e.g. GET, POST, PUT, DELETE) and extension methods from WebDAV, CalDAV, and other specifications. Unrecognized method strings produce none from ofString?.

References:

A method is a verb that describes the action to be performed.

Covers all methods in the IANA HTTP Method Registry.

Instances For
    @[instance_reducible]
    @[instance_reducible]
    @[instance_reducible]

    Converts a String into a Method. Returns none for unrecognized method strings.

    Instances For

      Converts a String into a Method, panicking if unrecognized.

      Instances For

        Returns true for HTTP methods that RFC 9110 §9.2.2 designates as idempotent — methods that can be safely retried because repeating the request has the same effect as issuing it once.

        Reference: https://httpwg.org/specs/rfc9110.html#idempotent.methods

        Instances For

          Returns true for HTTP methods that RFC 9110 §9.2.1 designates as safe — read-only methods that do not modify resource state.

          Reference: https://httpwg.org/specs/rfc9110.html#safe.methods

          Instances For
            @[instance_reducible]