diff --git a/poc/bin/response b/poc/bin/response index 9113975..225aa83 100755 --- a/poc/bin/response +++ b/poc/bin/response @@ -16,4 +16,11 @@ # limitations under the License. # -curl -sf -X PUT --data-binary @- ${KAPOW_URL}/connections/${KAPOW_CONNECTION}/response$1 +if [ $# -lt 1 ]; then + echo "Response object is mandatory" >&2 + exit 1 +elif [ $# -eq 1 ]; then + curl -N -sf -X PUT --data-binary @- ${KAPOW_URL}/connections/${KAPOW_CONNECTION}/response$1 +else + curl -sf -X PUT --data-binary "$2" ${KAPOW_URL}/connections/${KAPOW_CONNECTION}/response$1 +fi