Url.variables.setSearchParam
fx-fetch / Url / setSearchParam
Variable: setSearchParam()
Section titled “Variable: setSearchParam()”
constsetSearchParam: {(url,key,value):Url; (key,value): (url) =>Url; }
Defined in: packages/fx-fetch/src/Url/setSearchParam.ts:42
Sets a search parameter on a Url.
Call Signature
Section titled “Call Signature”(
url,key,value):Url
Sets a search parameter on a Url.
Parameters
Section titled “Parameters”string
SearchParamValueInput
Returns
Section titled “Returns”Example
Section titled “Example”import { Url } from 'fx-fetch';
const url = Url.make('https://api.example.com');const urlWithParam = Url.setSearchParam(url, 'page', '1');0.1.0
Call Signature
Section titled “Call Signature”(
key,value): (url) =>Url
Sets a search parameter on a Url.
Parameters
Section titled “Parameters”string
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');const urlWithParam = pipe( url, Url.setSearchParam('page', '1'));0.1.0
Example
Section titled “Example”import { Url } from 'fx-fetch';
const url = Url.make('https://api.example.com');const urlWithParam = Url.setSearchParam(url, 'page', '1');0.1.0