HttpRequest
Upgather SDK / HttpRequest
Class: HttpRequest
Defined in: lib/core/HttpRequest.ts:10
Represents an HTTP request.
Remarks
This class encapsulates the properties of an HTTP request, including the URL, HTTP method, headers, and body.
Constructors
new HttpRequest()
new HttpRequest(
url,method,headers?,body?):HttpRequest
Defined in: lib/core/HttpRequest.ts:28
Creates an instance of HttpRequest.
Parameters
url
string
The URL of the request.
method
string
The HTTP method to use.
headers?
Map<string, string>
(Optional) A map of header keys and values.
body?
(Optional) The body of the request.
Returns
Properties
body
body:
Json
Defined in: lib/core/HttpRequest.ts:18
The body of the HTTP request.
headers
headers:
Map<string,string>
Defined in: lib/core/HttpRequest.ts:16
The headers of the HTTP request.
method
method:
string
Defined in: lib/core/HttpRequest.ts:14
The HTTP method (e.g., GET, POST).
url
url:
string
Defined in: lib/core/HttpRequest.ts:12
The URL of the HTTP request.
Methods
setHeader()
setHeader(
key,value):void
Defined in: lib/core/HttpRequest.ts:46
Sets a header for the HTTP request.
Parameters
key
string
The header key.
value
string
The header value.
Returns
void