Status Code (-SC or -STATUS_CODE)
The -STATUS_CODE option returns an HTTP status code through the HTTP listener to the external HTTP client that requested a particular URL. The HTTP status code is associated with one or more map return codes. You can customize the HTTP status codes or use the default codes defined in the /runtime/M4HTTP/StatusCode path of the config.yaml configuration file.
- Option
- Description
- map_return_code
- The numeric code indicating the map execution result. See the Map Designer description of map execution and warning messages for a list of execution codes.
- HTTP_status_code
- An official HTTP status code maintained by the Internet Assigned Numbers Authority (IANA).
To specify multiple map return code/HTTP status code combinations on a single
-STATUS_CODE keyword, separate each combination with a comma (,) character. For
example:
-STATUS_CODE “30 = 400 Bad Request, 12 = 404 Not Found”
To link multiple map return codes to a single HTTP status code, delineate each map code with a
colon (:) character. For example:
-STATUS_CODE “8:9:30 = 400 Bad Request"