@metreeca/http - v0.1.1
    Preparing search index...

    Function getMethod

    • Retrieves the method of a request.

      Note

      A method name is case-sensitive, so an extension method is reported exactly as stated and only the standard names fetch normalises are folded to uppercase: what is reported is the method the origin server is asked for, so it compares directly against the standard names without ever misreporting an extension method defined in lowercase.

      Parameters

      • input: RequestInfo | URL

        The request or target URL the method is to be retrieved from, unless overridden by init

      • Optionalinit: RequestInit

        The request options the method is to be retrieved from, taking precedence over input

      Returns string

      The name of the method stated by init or by input, defaulting to GET, uppercased if it names one of the methods fetch case-normalises