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

Return nothing or Error 500 when posting JSON by Python requests?

I have a crawl-data task, after inspecting the URL with Firefox F12 (DevTools), I find that the site needs a JSON array input looks like: phyIDs: Array 0: "FDER047ERDF" and returns some data also in JSON format: trueIDs: Array 0:…
0
votes
1 answer

.Net WCF 415 Missing Content Type

I runnning into a problem I am unable to fix. I have found some related questions on SO, but none have helped me so far. This is the code that is running: HttpWebRequest handler = (HttpWebRequest)WebRequest.Create("someUrl"); handler.Method =…
Roeland
  • 820
  • 1
  • 9
  • 33
0
votes
1 answer

Error 415 with ajax request (Spring)

My ajax request gets sent but never reaches my conrtroller, I get a 415 Error () The Ajax Request function likeAjax(mId) { var data = {} data["id"] = mId; $.ajax({ type : "POST", headers: { 'Accept':…
benzi11
  • 3
  • 7
0
votes
1 answer

Request AJAX with formData give me a 415 HTTP Error (Unsupported media type)

I want post a formdata where somme value/files can be null/empty. I tried to modify every parameters but when i resolve the 415 i get a 405 error. Here is my controller function @RequestMapping(value = "/cart/post", method = RequestMethod.POST) …
Millet Antoine
  • 405
  • 1
  • 6
  • 24
0
votes
1 answer

Upload MultipartFile in Springboot fails with 415

I have a post operation which takes multipartfile as request, i would like to store it on the FTP later. But for now I have just the method setup and when trying to invoke from postman, it gives me an error response HTTP 415. This is what I…
0
votes
3 answers

Getting CORS error when sending data to JAVA post REST API in Angular 4

I am sending reactive form data through post request to java restful web api but it shows me CORS error While same is working fine in GET request. I already set the CORS header in response of rest api. Angular Service Code : private headers = new…
Nishant Varshney
  • 685
  • 2
  • 14
  • 34
0
votes
1 answer

getting http 415, Unsupported Media Type using text/xml

I have a jersey endpoint(JAX-RS) that I'm trying to hit with a text/xml req. I'm getting back an http 415 and I don't understand why. Here is the info. Any ideas? …
Ron Stevenson
  • 166
  • 1
  • 13
0
votes
2 answers

API Gateway CORS HTTP 415

Okay, I've been all over these interwebs looking for some insight to my issue; I've probably been through over 80 stack overflow threads RE api gateway and such, but none of them seem to help or speak close enough to my issue. I'm new to API Gateway…
0
votes
2 answers

AngularJs Spring MVC $http.post Error 415 (Unsupported Media Type)

Trying to send data from angularjs to Spring MVC but keeps getting 415 error app.controller('RegisterFormSubmitCtrl', ['$scope', '$http', '$location', function($scope, $http) { $scope.submit = function() { var registerData = { "email"…
Celeste
  • 97
  • 2
  • 13
0
votes
0 answers

Rest Webservice Returns 415 unsupported media Type.

Before you go ahead and mark it as duplicate, please note, this is not a duplicate question. I have checked all the previously accepted answers and I added the following with no help. @Produces("application/json"),…
CaRtY5532
  • 99
  • 1
  • 8
0
votes
1 answer

Java MongoDB POST : 415 unsupported mediatype

I am building my first API. The GET request works, but i am stuck at a POST request with error 415 Unsupported mediatype. After some searching and rewriting code, it still fails. Does someone see why? The parameter values are : -String userName…
DutchProgrammer
  • 107
  • 1
  • 9
0
votes
1 answer

Getting 415 status error while call WCF service using jquery ajax for PhoneGap Android Application from a intranet hosted service on a Windows server

I am trying to consume WCF service in a PhoneGap application for Android using jquery ajax which is hosted in a intranet domain. As a response I am getting message based on my ajax request in the below. Ajax Request: $.ajax({ url:…
Nemo
  • 352
  • 3
  • 13
0
votes
1 answer

Using Jersey's @BeanParam results in a 415 error

I am trying to use Jersey's @BeanParam annotation the following way: This is my bean: public class BeanParamModel { @QueryParam(value = "param1") private String param1; public BeanParamModel(@QueryParam("param1") String param1) { this.param1 =…
Anat
  • 1
  • 1
  • 2
0
votes
1 answer

Grizzly HTTP Server 415 Unsupported Media Type

I'm developing a set of REST services, using RESTEasy and WildFly 9.0.2. One of them allows me to upload a file. @POST @Path("/upload") @Consumes(MediaType.MULTIPART_FORM_DATA) public Response upload(MultipartFormDataInput input); I successfully…
António Ribeiro
  • 4,129
  • 5
  • 32
  • 49
0
votes
0 answers

REST service giving HTTP Error 415 in JAVA

I am trying to make a REST service that takes in a JSON body in POST method. So, my Service class is : @Service @Path("/newalert/") public class addAlert { @POST @Consumes(MediaType.APPLICATION_JSON) public Response newAlert(final…
Priyansh Goel
  • 2,660
  • 1
  • 13
  • 37