Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Content-Type being set to application/x-www-form-urlencode when choosing No Body on a Put Request causing 415 error #2323

Open
2 tasks done
ngerwig725 opened this issue May 16, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@ngerwig725
Copy link

ngerwig725 commented May 16, 2024

I have checked the following:

  • I use the newest version of bruno.
  • I've searched existing issues and found nothing related to my issue.

Describe the bug

I am using the desktop version, I have a put request (works fine in Postman) to retrieve a signed URL from an internal source. I am passing the 5 pieces of required information in the query tab, the api-key in the header and choosing No Body in the body tab. I am receiving a 415 unsupported media error
{
"Code": "UnsupportedMediaType",
"Message": "Unsupported media type: application/x-www-form-urlencoded"
}

.bru file to reproduce the bug

No response

Screenshots/Live demo link

Here is the timeline:

PUT https://smbjaf8ibf.execute-api.us-east-1.amazonaws.com/wheatley-gateway/latest/blueprint/get_signed_url?institution_name=Institution_Name&environment=BAN83_954067357&filename=00725/BAN83_954067357/banner_compare_results.zip&fice=00725&production=False
x-api-key: cannot send you that
< 415 Unsupported Media Type
< content-type: application/json
< content-length: 101
< connection: keep-alive
< date: Thu, 16 May 2024 14:45:52 GMT
< x-amzn-requestid: 2314781a-4a67-48fc-b635-5c32df74e0f5
< access-control-allow-origin: https://cloud-docs.10006.elluciancloud.com
< access-control-allow-headers: Authorization,Content-Type,X-Amz-Date,X-Amz-Security-Token,X-Api-Key,X-Special-Header
< x-amz-apigw-id: X3lVDEN7oAMEPQg=
< access-control-expose-headers: X-Special-Header
< x-amzn-trace-id: Root=1-66461c20-5200460a0237b279055c6ab5;Parent=7cc434875fa01f14;Sampled=0;lineage=366a7af8:0
< access-control-max-age: 600
< access-control-allow-credentials: true
< x-cache: Error from cloudfront
< via: 1.1 1019c7748e9bd9371b8cbc3777f0a40e.cloudfront.net (CloudFront)
< x-amz-cf-pop: IAD79-C2
< x-amz-cf-id: _CU6mks2NR9o5DYJtWVVtqysruEtELBL4k6e9owcKAXfFTZSwJGBcQ==

@ngerwig725 ngerwig725 added the bug Something isn't working label May 16, 2024
@ngerwig725
Copy link
Author

Using HTTPToolkit I captured the PUT request:
METHOD: PUT
URL
https://smbjaf8ibf.execute-api.us-east-1.amazonaws.com/wheatley-gateway/latest/blueprint/get_signed_url?institution_name=Institution%20Name&environment=BAN83_954067357&filename=00725/BAN83_954067357/banner_compare_results.zip&fice=00725&production=False
HEADERS
Accept:
application/json, text/plain, /
Accept-Encoding:
gzip, compress, deflate, br
Connection:
keep-alive
Content-Length:
0
Content-Type:
application/x-www-form-urlencoded
Host:
smbjaf8ibf.execute-api.us-east-1.amazonaws.com
request-start-time:
1715954928121
User-Agent:
axios/1.6.8
x-api-key: redacted

Content type is being set to application/x-www-form-urlencoded even though I am choosing No Body

@ngerwig725 ngerwig725 changed the title Getting a 415 Unsupported Media Type application/x-www-form-urlencode. when choosing No Body on a Put Request Content-Type being set to application/x-www-form-urlencode when choosing No Body on a Put Request causing 415 error May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant