Web APIs
Request.method
Expose the request method string after the constructor normalizes standard methods. Constructing a Request does not send it. Example console output: POST.
Formal Syntax & Structure
javascript syntaxjavascript
request.methodReturn Value
string
HTTP method.
Working Example
Example Snippetjavascript
const r=new Request("https://example.invalid/items",{method:"post",body:"x"}); console.log(r.method);