Skip to main content

Class: RequestController

moralis-monorepo / @moralisweb3/common-core / RequestController

Class: RequestController

@moralisweb3/common-core.RequestController

A controller responsible to handle all requests in Moralis, compatible with browser, nodejJs and react-native

Table of contents

Methods

Methods

create

Static create(core): RequestController

Parameters

NameType
coreCore

Returns

RequestController


delete

delete<Response, Body>(url, searchParams?, body?, options?, abortSignal?): Promise<Response>

Type parameters

Name
Response
Body

Parameters

NameType
urlstring
searchParams?Record<string, unknown>
body?Body
options?RequestOptions
abortSignal?AbortSignal

Returns

Promise<Response>


get

get<Response>(url, searchParams?, options?, abortSignal?): Promise<Response>

Type parameters

Name
Response

Parameters

NameType
urlstring
searchParams?Record<string, unknown>
options?RequestOptions
abortSignal?AbortSignal

Returns

Promise<Response>


post

post<Response, Body>(url, searchParams?, body?, options?, abortSignal?): Promise<Response>

Type parameters

Name
Response
Body

Parameters

NameType
urlstring
searchParams?Record<string, unknown>
body?Body
options?RequestOptions
abortSignal?AbortSignal

Returns

Promise<Response>


put

put<Response, Body>(url, searchParams?, body?, options?, abortSignal?): Promise<Response>

Type parameters

Name
Response
Body

Parameters

NameType
urlstring
searchParams?Record<string, unknown>
body?Body
options?RequestOptions
abortSignal?AbortSignal

Returns

Promise<Response>


request

request<Data, Response>(config): Promise<Response>

Type parameters

Name
Data
Response

Parameters

NameType
configAxiosRequestConfig<Data>

Returns

Promise<Response>