diff --git a/readme.md b/readme.md index ee707ab3e95e977646263d43e42a50b53c805d75..0b816207a0a85a2caf5a4358a1f69ba511eb790f 100644 --- a/readme.md +++ b/readme.md @@ -1,6 +1,7 @@ # REST API CLIENT # This is a bash solution to script REST API calls. + The specialties of this component are * It was build to simplify http calls and use it in scripts @@ -12,6 +13,7 @@ The specialties of this component are Source: https://git-repo.iml.unibe.ch/iml-open-source/bash-rest-api-client + License: GNU GPL 3 @@ -127,8 +129,11 @@ INSTRUCTION: - check http status code + http.getStatus + Get the http status as string Ok|Redirect|Error + http.getStatuscode - Get the http status code of a request + Get the http status code of a request as integer http.isOk Check if the http response code is a 2xx @@ -178,4 +183,4 @@ INSTRUCTION: Delete a file after http.responseExport. It is useful if you use the AUTOFILE mechanism. -``` \ No newline at end of file +``` diff --git a/rest-api-client.sh b/rest-api-client.sh index ced0a3446c5564f56d40b733c90c5a1389b6fc3c..ed27935869dd70543d86b6b245d64e528548269b 100644 --- a/rest-api-client.sh +++ b/rest-api-client.sh @@ -646,8 +646,11 @@ INSTRUCTION: - check http status code + http.getStatus + Get the http status as string Ok|Redirect|Error + http.getStatuscode - Get the http status code of a request + Get the http status code of a request as integer http.isOk Check if the http response code is a 2xx