MCPcopy Create free account
hub / github.com/Effect-TS/effect / toUrl

Function toUrl

packages/effect/src/unstable/http/HttpClientRequest.ts:879–885  ·  view source on GitHub ↗
(self: HttpClientRequest)

Source from the content-addressed store, hash-verified

877 * @since 4.0.0
878 */
879export function toUrl(self: HttpClientRequest): Option.Option<URL> {
880 const r = Url.make(self.url, self.urlParams, Option.getOrUndefined(self.hash))
881 if (Result.isSuccess(r)) {
882 return Option.some(r.success)
883 }
884 return Option.none()
885}
886
887/**
888 * Converts a Web `Request` into an `HttpClientRequest`, preserving method, URL, headers, and supported request bodies.

Callers

nothing calls this directly

Calls 2

someMethod · 0.80
makeMethod · 0.65

Tested by

no test coverage detected