Questions tagged [http-status-code-415]

HTTP status code for Unsupported Media Type

This is usually because of typos in Content-Type header. Or in the rare case, where you're really sending unsupported media.

MDN Documentation

155 questions
4
votes
3 answers

Disable redirect to last accessed resource on form login Glassfish

I'm going to rewrite my previous question. Glassfish redirects after form login to the last accessed resource, how do I go about to turn this off? Our problem is that we get 415 in FF and IE because if I have a JSESSION cookie Glassfish will…
Magnus
  • 3,691
  • 5
  • 27
  • 35
4
votes
1 answer

Getting HTTP 415 error on HttpURLConnection connect

I'm using the following code to send a GET request and then receive response: try { URL url = new URL(strurl); HttpURLConnection con = (HttpURLConnection) url.openConnection(); con.setRequestMethod("GET"); con.setDoOutput(true); …
horgh
  • 17,918
  • 22
  • 68
  • 123
3
votes
1 answer

Getting HTTP Status 415 - Unsupported Media Type with Jersey

Below is my POJO class public class Credentials { private int cred_id; private String cred_user_name; private String cred_password; private String cred_token; public Credentials(int cred_id, String cred_user_name, String cred_password,…
Balaji Vignesh
  • 446
  • 1
  • 7
  • 19
3
votes
2 answers

Asterisk incoming message gives: 415 unsupported media type

Me and my project group are trying to set up a PBX with asterisk. We've managed to let it work with just SIP calls and that works perfect. But once we want to try add an XML message to it Asterisk doesn't recognize it and gives "415 Unsupported…
3
votes
0 answers

jQuery POST JSON request to Python Flask server 415 Unsupported Media Type Error

I've got problem with sending POST request from jQuery to server created in Flask. In POSTMAN extension to Chrome everything seems to work fine - response is sent back to client. While sending request from java script I get "415 Unsupported Media…
3
votes
2 answers

Jersey : JSON Unsupported Media Type

I want to create a rest api that get json data and send json data. My Book class : @Entity public class Book { @Id private String isbn; public Book() { } ...... } My Book service : @Path("/books") public class BookService…
damien marchand
  • 864
  • 1
  • 13
  • 30
2
votes
1 answer

font-awesome loading locally from project getting 415 (Unsupported Media Type)

Configured in the project to load "fontawesome.min.css" from the local project folder instead of from CDN. Followed the below steps and configuration, now getting 415 Unsupported Media type. Downloaded the font-awesome-4.7.0.zip file from…
DAIRAV
  • 723
  • 1
  • 9
  • 31
2
votes
1 answer

Angular 12 typescript upload files error 415 unsupported media type

I am trying to upload an image with angular 12 and spring boot, the api on the back side behaves correctly for having tested it with postman. When I test front side I get this error: "status: 415, error: "Unsupported Media Type", message: "Content…
2
votes
0 answers

"error": "Unsupported Media Type" on Upload File Controller

I have a simple project that works on PDF files. I am trying to code a File Upload Controller. I've tried lots of ways to do this but it keeps giving me this error : Resolved [org.springframework.web.HttpMediaTypeNotSupportedException: Content type…
prof958
  • 23
  • 1
  • 4
2
votes
1 answer

Is there a way to change the Content Type for a Postman OAuth 2 Client Credentials request?

I'm trying to use the built in tool to get an OAuth 2.0 token for my requests. This seems pretty straightforward when reading the documentation and I set it up like this: The issue is that the request for the token is sent with a content type of…
2
votes
0 answers

Angular 6 - file upload unsupported media type 415

I tested my upload API on Postman, it works, but in my app (Angular 6 + .net-core 2.1), the network always returns error 415 unsupported media type because the Content-Type in request headers is always application/JSON. Basically, I use httpClient…
Hoàng Nguyễn
  • 1,121
  • 3
  • 33
  • 57
2
votes
2 answers

Trying to send FormData from Angular 5 app to ASP.NET 4.6.1 Web API : getting an "unsupported media type" error

So in my Angular front-end app I have a form and in the typescript file I create a new formdata object and append the items to it like so: public postFormData() { const form = $('#customListForm')[0]; const formData = new FormData(); …
Tempuslight
  • 1,004
  • 2
  • 17
  • 34
2
votes
2 answers

Error 415 on POST with jersey

When I use POST on the client side, I receive the following error. HTTP Status 415 - Unsupported Media Type Type: Status Report Message: Unsupported Media Type Description: The origin server is refusing to service the request because the payload is…
SEMP
  • 21
  • 4
2
votes
2 answers

415 Unsupported Media Type HTTP

I'm trying to send a GET request to Cisco ISE, but get this error: 415 Unsupported Media Typen What am I doing wrong? The API documentation says: Method: GET URI: https://10.10.10.10:9060/ers/config/networkdevice/ HTTP 'Accept'…
StayCalm
  • 145
  • 2
  • 13
2
votes
0 answers

how can i fix this error about ajax post return 415 code

I use ajax to post the data: