Verifies if response status is correct. If not it stops execution with message.
1 | .check_response_status(resp, expected_code, error_message = "Request failed")
|
resp |
httr response |
expected_code |
numeric with expected code e.g. 201 |
error_message |
character with error message |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.