Skip to content

Commit

Permalink
docs: initMethod
Browse files Browse the repository at this point in the history
  • Loading branch information
glebcha committed Mar 11, 2024
1 parent 8acd018 commit fa9ee2a
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/createHttpClient/initMethod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,23 @@ import { is } from '../utils';

import { createMethod } from './createMethod';

/**
* @namespace httpClient
* @module initMethod
* @description Wrapper that return REST method.
* @param {string} method
* @param {Object} options
* @param {string} options.query
* @param {number} options.timeout
* @param {string} options.url
* @param {Function[]} options.middleware
* @param {Object} options.params
* @param {string} options.method
* @param {string} options.format
* @throws {Response & { formattedResponse: string | object }}
* @returns {Response} resolved or rejected promise
*/

export function initMethod(method: `${Lowercase<Methods>}`, options?: CreateHttpClientOptions) {
return (methodOptions?: unknown) => {

Expand Down

0 comments on commit fa9ee2a

Please sign in to comment.