Url.variables.deleteSearchParam
fx-fetch / Url / deleteSearchParam
Variable: deleteSearchParam()
Section titled “Variable: deleteSearchParam()”
constdeleteSearchParam: {(url,key,value?):Url; (key,value?): (url) =>Url; }
Defined in: packages/fx-fetch/src/Url/deleteSearchParam.ts:57
Deletes search parameters from a Url. If a value is provided, only that value is removed; otherwise, all values for the key are removed.
Call Signature
Section titled “Call Signature”(
url,key,value?):Url
Deletes search parameters from a Url. If a value is provided, only that value is removed; otherwise, all values for the key are removed.
Parameters
Section titled “Parameters”string
value?
Section titled “value?”SearchParamValueInput
Returns
Section titled “Returns”Example
Section titled “Example”import { Url } from 'fx-fetch';
const url = Url.make('https://api.example.com?page=1&limit=10');const urlWithoutParam = Url.deleteSearchParam(url, 'page');0.1.0
Call Signature
Section titled “Call Signature”(
key,value?): (url) =>Url
Deletes search parameters from a Url. If a value is provided, only that value is removed; otherwise, all values for the key are removed.
Parameters
Section titled “Parameters”string
value?
Section titled “value?”SearchParamValueInput
Returns
Section titled “Returns”(
url):Url
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Example
Section titled “Example”import { Url } from 'fx-fetch';import { pipe } from 'effect';
const url = Url.make('https://api.example.com?page=1&limit=10');const urlWithoutParam = pipe( url, Url.deleteSearchParam('page'));0.1.0
Example
Section titled “Example”import { Url } from 'fx-fetch';
const url = Url.make('https://api.example.com?page=1&limit=10');const urlWithoutParam = Url.deleteSearchParam(url, 'page');0.1.0