Allowing a second argument to response to specify the value.

This commit is contained in:
Roberto Abdelkader Martínez Pérez
2019-04-29 11:53:15 +02:00
parent a3e53f17e0
commit 87dff09afb
+8 -1
View File
@@ -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