From 14ef08503f33297ad96d50fe1303c5f67bcd8e79 Mon Sep 17 00:00:00 2001 From: Matthew Slowe Date: Tue, 29 Mar 2022 13:28:40 +0100 Subject: [PATCH] Allow override to arbitrary Content-Type --- README.md | 3 ++- test.sh | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e9e47c0..5daa7aa 100644 --- a/README.md +++ b/README.md @@ -27,4 +27,5 @@ URL=https://idp.example.com/idp/profile/SAML2/SOAP/ECP \ bash test.sh | xmllint --pretty 1 - ``` - +You can also override the HTTP `Content-Type` in the request by setting +`CONTENT_TYPE` environment variables. diff --git a/test.sh b/test.sh index 40bf47c..2087f54 100755 --- a/test.sh +++ b/test.sh @@ -24,6 +24,6 @@ echo $REQUEST | xmllint --pretty 1 - echo $REQUEST | curl -k \ -d @- \ - -H "Content-Type: text/xml" \ + -H "Content-Type: ${CONTENT_TYPE:-text/xml}" \ --basic -u $CRED \ $URL