Allow override to arbitrary Content-Type

This commit is contained in:
Matthew Slowe 2022-03-29 13:28:40 +01:00 committed by Matthew Slowe
parent 8549c30e10
commit 14ef08503f
2 changed files with 3 additions and 2 deletions

View File

@ -27,4 +27,5 @@ URL=https://idp.example.com/idp/profile/SAML2/SOAP/ECP \
bash test.sh | xmllint --pretty 1 - bash test.sh | xmllint --pretty 1 -
``` ```
You can also override the HTTP `Content-Type` in the request by setting
`CONTENT_TYPE` environment variables.

View File

@ -24,6 +24,6 @@ echo $REQUEST | xmllint --pretty 1 -
echo $REQUEST | echo $REQUEST |
curl -k \ curl -k \
-d @- \ -d @- \
-H "Content-Type: text/xml" \ -H "Content-Type: ${CONTENT_TYPE:-text/xml}" \
--basic -u $CRED \ --basic -u $CRED \
$URL $URL