return_status: HTTP request status

Description Usage Arguments Value See Also

Description

return_status checks whether an HTTP request was successful and prints the contents of the error if the request was not successful.

Usage

1
2
return_status(response_data, ok_status = c(200, 201, 202),
  print_when_ok = "Done.\n")

Arguments

response_data

HTTP response.

ok_status

the status code that indicates the HTTP request was successful.

print_when_ok

the message to print if the HTTP request was successful.

Value

For successful HTTP requests, return_status returns TRUE and prints the print_when_ok message. For unsuccessful HTTP requests, return_status returns FALSE and prints the content of the response message.

See Also

api_get_batch, api_create, api_update, api_delete, api_get, api_search_by_epicid, api_search_by_updated_at, api_check


UCSF-MSLAB/msbwaiter documentation built on May 9, 2019, 5:19 p.m.