Thanks to visit codestin.com
Credit goes to effect-ts.github.io

Skip to main content Codestin Search App Codestin Search App Codestin Search App Codestin Search App Codestin Search App Codestin Search App

HttpMethod.ts overview

Since v1.0.0


Exports Grouped by Category


models

HttpMethod (type alias)

Signature

type HttpMethod = "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS"

Source

Since v1.0.0

HttpMethod (namespace)

Source

Since v1.0.0

NoBody (type alias)

Signature

type NoBody = "GET" | "HEAD" | "OPTIONS"

Source

Since v1.0.0

WithBody (type alias)

Signature

type WithBody = Exclude<HttpMethod, NoBody>

Source

Since v1.0.0

refinements

isHttpMethod

Tests if a value is a HttpMethod.

Example

import { HttpMethod } from "@effect/platform"

console.log(HttpMethod.isHttpMethod("GET"))
// true
console.log(HttpMethod.isHttpMethod("get"))
// false
console.log(HttpMethod.isHttpMethod(1))
// false

Signature

declare const isHttpMethod: (u: unknown) => u is HttpMethod

Source

Since v1.0.0

utils

all

Signature

declare const all: ReadonlySet<HttpMethod>

Source

Since v1.0.0

hasBody

Signature

declare const hasBody: (method: HttpMethod) => boolean

Source

Since v1.0.0