Versions Compared

Key

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

Responses are generally made up of three components. The net.http.* API returns responses in these three parts so you can handle the responses appropriately:

...

Expand
title1) HTTP Status Code

The status includes standardized codes and messages for certain request outcomes. When working with web services you’ll commonly see:

  • 2XX Success: The request was successful (e.g., 200 OK, 201 Created).

  • 4XX Client errors: The request contains incorrect syntax or cannot be fulfilled (e.g., 400 Bad Request, 401 Unauthorized, 404 Not Found).

  • 5XX Server errors: The server failed to fulfill a valid request (e.g, 503 Service Unavailable).

In the above screenshot, the status code of 201 means resource was successfully created.

...