Skip to content

Commit

Permalink
adding condition for response 202
Browse files Browse the repository at this point in the history
  • Loading branch information
skublik committed Oct 1, 2018
1 parent 5ec9246 commit 9b1a4d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library.bash
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ function add_object () {
response=$(curl -k -sD - --silent --write-out "%{http_code}" --user administrator:5ecr3t -H "Content-Type: application/xml" -X POST "https://localhost:8443/midpoint/ws/rest/$TYPE" -d @$FILE)
http_code=$(sed '$!d' <<<"$response")

if [ "$http_code" -eq 201 ]; then
if [ "$http_code" -eq 201 ] || [ "$http_code" -eq 202 ]; then
headers=$(sed -n '1,/^\r$/p' <<<"$response")

# get the real Location
Expand Down

0 comments on commit 9b1a4d7

Please sign in to comment.