hayata
5 years agoAce
Set HTTP response code on custom endpoint
How is a standard HTTP status code set on a custom endpoint? By default, it returns 200, but I need to set 204 and 500.
- 5 years ago
Hi hayata ,
Within endpoints, you can use:
${http.response.setStatus(400)}
Please note that this method only works inside Endpoints. Please see https://developer.khoros.com/khoroscommunitydevdocs/reference/httpresponse#setstausstatus_code-1 for more details.