Skip to content

Url.variables.setSearchParams

fx-fetch


fx-fetch / Url / setSearchParams

const setSearchParams: {(url, params): Url; (params): (url) => Url; }

Defined in: packages/fx-fetch/src/Url/setSearchParams.ts:43

Sets multiple search parameters on a Url.

(url, params): Url

Sets multiple search parameters on a Url.

Url

SearchParamsInput

Url

import { Url } from 'fx-fetch';
const url = Url.make('https://api.example.com');
const urlWithParams = Url.setSearchParams(url, { page: '1', limit: '10' });

0.1.0

(params): (url) => Url

Sets multiple search parameters on a Url.

SearchParamsInput

(url): Url

Url

Url

import { Url } from 'fx-fetch';
import { pipe } from 'effect';
const url = Url.make('https://api.example.com');
const urlWithParams = pipe(
url,
Url.setSearchParams({ page: '1', limit: '10' })
);

0.1.0

import { Url } from 'fx-fetch';
const url = Url.make('https://api.example.com');
const urlWithParams = Url.setSearchParams(url, { page: '1', limit: '10' });

0.1.0