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
0
votes
2 answers

JSON.stringify API returns 415 (.net & angular)

I'm running into a bit of trouble on a POST request from my angular front to my .net API. Here is the code on the front: [...] this.uploadFile(JSON.stringify(jsonobject)); } uploadFile(file) { …
Diveye
  • 271
  • 3
  • 16
0
votes
1 answer

Passing Model into the View in ASP.NET Core MVC

I get a 415 status when I pass my model as an argument. The error says "title": "Unsupported Media Type", "status":415. Here is how I am passing in the model My Controller: [HttpPost] [Route("/Home")] public async Task Home(bookModel…
0
votes
1 answer

How to send a png file by 'application/octet-stream' in Dart/Flutter to Microsoft Custom Vision?

I know this question could be redundant, but I am trying to send a png file through a POST request to Microsoft Custom Vision in Flutter. This is my code: void _makeRequest (File file) async { String url = ""; Map
0
votes
1 answer

415 unsupported media type : cloud API's

I'm following this IBM cloud doc to generate a IAM token to work with the specific account to which i have access with account id doc on postman i'm getting 415 unsupported media error What i could be missing while validating?
New123
  • 219
  • 1
  • 4
  • 13
0
votes
1 answer

415 Error On Ajax jQuery Call - Spring MVC Controller

I am facing 415-Unsupported Media Type error on the ajax call. I tried proposed solutions on Stackoverflow for similar questions, like adding a header to ajax call or passing dataType as json, but still the same response. Following is my code,…
0
votes
1 answer

Unsupported Media type error for request.post

I am working on a api call with python. Here I have the parameters in json format that was generated in the website I am trying to access. But when I try to run the program I get an 415: unsupported Media Type error. Not sure what I am doing wrong,…
Sashaank
  • 880
  • 2
  • 20
  • 54
0
votes
2 answers

asp.net core 2.2 posting file results in http/415 unsopported mediatype

From postman I'm trying to post a file to an asp.net core 2.2 api-controller. POST /api/epd/noshow/uploadfile HTTP/1.1 Host: localhost:44361 User-Agent: PostmanRuntime/7.11.0 Accept: */* Cache-Control: no-cache Postman-Token:…
0
votes
2 answers

HTTP Error 415 Unsupported Media Type on REST service operation with an XML parameter (Jersey + Jetty )

I developed a REST service with Jersey and Jetty. The service has two operations: GET on resource test POST on resource employee which consumes an Employee instance sent as an XML When I'm calling the test operation everything works as expected,…
Francesc Lordan
  • 519
  • 4
  • 24
0
votes
1 answer

Python Post Request - Getting 415 Error When Sending Files via Outlook API

I've been having some trouble sending files via python's rest module. I can send emails without attachments just fine but as soon as I try and add a files parameter, the call fails and I get a 415 error. I've looked through the site and found out it…
0
votes
1 answer

Getting 415 Unsupported Media Type when requesting Token from Spotfiy API

I am trying to request a token from spotify api to use in my app. But I am getting a "415 unsupported media type" error. How can I get past this error? I've tried this in POSTMAN and it seems to work fine. I've tried to change Content Type from…
0
votes
1 answer

REST call response HTTPS Status 415

Please find below my controller code. @RequestMapping(value = "/reconrangesummary", method=RequestMethod.POST, produces=MediaType.APPLICATION_JSON_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) @ResponseBody public String…
saratbala
  • 29
  • 3
0
votes
1 answer

Restful web service 415

@RestController @RequestMapping(value="/uri",produces = "application/json", consumes="application/json") public class VisitorService { VisitorDAO vis=new VisitorDAO(); @RequestMapping(value = "/ex" ,method = RequestMethod.POST) public String…
Kiran S
  • 78
  • 1
  • 10
0
votes
2 answers

415 Unsupported Media

415 Unsupported Media what does it mean? I'm getting this error in my HttpClient MultiPart Form data Request. No matter what change I make in the header or body there is no change in the error. Can anyone shed some light on what I could be doing…
0
votes
1 answer

HTTP Status 415 – Unsupported Media Type error in Spring MVC with angular js

The origin server is refusing to service the request because the payload is in a format not supported by this method on the target resource. Controller class @RequestMapping(value="/register", method = RequestMethod.POST) public ModelAndView…
Vignesh_E
  • 167
  • 2
  • 4
  • 15
0
votes
1 answer

Why ASP.Net core returns 400 by default if the request is not Json when it should

According to Microsoft and Mozilla docs a 415 status code is: Microsoft: HTTP_STATUS_UNSUPPORTED_MEDIA 415 The server is refusing to service the request because the entity of the request is in a format not supported by the requested resource for …
Yahya Hussein
  • 8,767
  • 15
  • 58
  • 114