Request.functions.getMethod
fx-fetch / Request / getMethod
Function: getMethod()
Section titled “Function: getMethod()”getMethod(
self):"CONNECT"|"DELETE"|"GET"|"HEAD"|"OPTIONS"|"PATCH"|"POST"|"PUT"|"TRACE"
Defined in: packages/fx-fetch/src/Request/getMethod.ts:19
Gets the HTTP method of the request.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”"CONNECT" | "DELETE" | "GET" | "HEAD" | "OPTIONS" | "PATCH" | "POST" | "PUT" | "TRACE"
Example
Section titled “Example”import { Request } from 'fx-fetch';
const request = Request.make({ url: 'https://api.example.com', method: 'POST' });const method = Request.getMethod(request);console.log(method); // 'POST'0.1.0