Class HttpClient
Inheritance
BaseObject
HttpClient
Inherited Members
BaseObject.type
BaseObject.valid
BaseObject.id
BaseObject.destroy
BaseObject.getMetaDataKeys
BaseObject.getSyncedMeta
BaseObject.hasSyncedMeta
BaseObject.getSyncedMetaKeys
BaseObject.refCount
Package: @altmp/altv-types
Syntax
class HttpClient extends BaseObject
Constructors
|
Improve this Doc
View Source
HttpClient()
Declaration
public HttpClient(): HttpClient
Methods
|
Improve this Doc
View Source
getByID(number)
Declaration
public static getByID(id: number): null | HttpClient
Parameters
Type |
Name |
Description |
number |
id |
|
Returns
|
Improve this Doc
View Source
Declaration
public setExtraHeader(header: string, value: string): void
Parameters
Type |
Name |
Description |
string |
header |
|
string |
value |
|
|
Improve this Doc
View Source
Declaration
public getExtraHeaders(): Record<string, string>
Returns
Type |
Description |
Record<string, string> |
|
|
Improve this Doc
View Source
get(string)
Declaration
public get(url: string): Promise<IHttpResponse>
Parameters
Type |
Name |
Description |
string |
url |
|
Returns
|
Improve this Doc
View Source
head(string)
Declaration
public head(url: string): Promise<IHttpResponse>
Parameters
Type |
Name |
Description |
string |
url |
|
Returns
|
Improve this Doc
View Source
post(string, string)
Declaration
public post(url: string, body: string): Promise<IHttpResponse>
Parameters
Type |
Name |
Description |
string |
url |
|
string |
body |
|
Returns
|
Improve this Doc
View Source
put(string, string)
Declaration
public put(url: string, body: string): Promise<IHttpResponse>
Parameters
Type |
Name |
Description |
string |
url |
|
string |
body |
|
Returns
|
Improve this Doc
View Source
delete(string, string)
Declaration
public delete(url: string, body: string): Promise<IHttpResponse>
Parameters
Type |
Name |
Description |
string |
url |
|
string |
body |
|
Returns
|
Improve this Doc
View Source
connect(string, string)
Declaration
public connect(url: string, body: string): Promise<IHttpResponse>
Parameters
Type |
Name |
Description |
string |
url |
|
string |
body |
|
Returns
|
Improve this Doc
View Source
options(string, string)
Declaration
public options(url: string, body: string): Promise<IHttpResponse>
Parameters
Type |
Name |
Description |
string |
url |
|
string |
body |
|
Returns
|
Improve this Doc
View Source
trace(string, string)
Declaration
public trace(url: string, body: string): Promise<IHttpResponse>
Parameters
Type |
Name |
Description |
string |
url |
|
string |
body |
|
Returns
|
Improve this Doc
View Source
patch(string, string)
Declaration
public patch(url: string, body: string): Promise<IHttpResponse>
Parameters
Type |
Name |
Description |
string |
url |
|
string |
body |
|
Returns