Skip to content

HTTPConnection ​

The HTTPConnection class provides access to response state for a pending or completed HTTP request.


Methods ​

IsResolved()boolean ​

Checks whether it is resolved.

Returned:

  • boolean - True if the condition is met, false otherwise.

GetBody()string ​

Retrieves the HTTP response body.

Returned:

  • string - The requested body.

GetStatusCode()number ​

Retrieves the HTTP response status code.

Returned:

  • number - The requested status code.

GetHeaders(){ [key: string]: string } ​

Retrieves the HTTP response headers.

Returned:

  • { [key: string]: string } - The requested headers.

GetID()number ​

Retrieves the HTTP request identifier.

Returned:

  • number - The requested id.