Versions Compared

Key

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

Sets the HTTP status code to be used in the response. This can be set at any time. If unchanged by other routines this will be the status code used.

Syntax

Code Block
Response = HTTP_Services('SetResponseStatus', Code, Phrase)

...

ParameterDescription
CodeHTTP status code to set. Required.
PhraseCustom phrase to send with the status code. Optional.

Remarks

The RunHTTPService service is the official way to call specific web service APIs. The HTTPService argument should contain the same name found in the URL segment that corresponds with the API resource. For instance, for the /customers URL, the HTTPService argument should contain the value of customers. This will call the HTTP_CUSTOMERS_SERVICES BASIC+ routine.

The RemainingURL argument will contain the value of the remaining portion of the URL that follows the current URL segment. Examples of managing this are found in the HTTP_Entry_Point_Services routineThis can be set at any time. If unchanged by other routines this will be the status code used. A standard list of HTTP status codes can be found here.