Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The HTTP client helper functions are used for error handling.

httpGetLastErrorCode

This function gets the last error code set.

Code Block
int httpGetLastErrorCode()


ParameterDescription

Returns

The HTTP status code. It will be -1 if no error occurred. Note that calling the httpGetLastErrorCode() function should only be done when the previous POST/GET request returned null.

httpGetLastErrorMessage

This function gets the last error message.

Code Block
string httpGetLastErrorMessage()


ParameterDescription

Returns

The HTTP status message. It will be null if no error occurred. Note that calling the httpGetLastErrorMessage() function should only be done when the previous POST/GET request returned null.

httpGetLastErrorResponse

This function gets the last response if the connection failed but the server sent useful data nonetheless.

Code Block
string httpGetLastErrorResponse()


ParameterDescription

Returns

A document from the HTTP server. It will be an empty string if no error occurred. Note that calling the httpGetLastErrorResponse() function should only be done when the previous POST/GET request returned null.

httpGetLastResponseHeader

This function retrieves the header from the last HTTP response.

Code Block
map<string,string> httpGetLastResponseHeader()


ParameterDescription

Returns

A map containing the response header


Scroll ignore
scroll-viewportfalse
scroll-pdftrue
scroll-officefalse
scroll-chmtrue
scroll-docbooktrue
scroll-eclipsehelptrue
scroll-epubtrue
scroll-htmlfalse


Next: