Skip to content
Permalink
Browse files

adding condition for response 202

  • Loading branch information
skublik committed Oct 1, 2018
1 parent 5ec9246 commit 9b1a4d7376ac69465195245ec463be9516cb5d9c
Showing with 1 addition and 1 deletion.
  1. +1 −1 library.bash
@@ -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

0 comments on commit 9b1a4d7

Please sign in to comment.
You can’t perform that action at this time.