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
1
vote
2 answers

HTTP Status 415 – Unsupported Media Type error

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 code @RestController public class UserController { @Autowired public IretrieveService…
Vignesh_E
  • 167
  • 2
  • 4
  • 15
1
vote
2 answers

Can't connect Azure Table Storage to PowerBI (415) Unsupported Media Type)

I'm getting the error below while connecting to Azure Table Storage, Details: Blockquote "AzureTables: Request failed: The remote server returned an error: (415) Unsupported Media Type. (None of the provided media types are supported) The one…
1
vote
3 answers

statusCode should be 200, but is 415

I am trying to post a simple string, but I continuously getting the HTTP 415 Unsupported Media Type Error. I tried converting the parameter to JSON still it didn't work. Method Updated func requestUsingPostMethod(url: String, parameter: String,…
Sathya Baman
  • 3,424
  • 7
  • 44
  • 77
1
vote
0 answers

Angular 4 unsupported media type

So in the backend I have dropwizard and I want to reach out to my /user/register route.. code: @Path("/user/register") @POST @Produces(MediaType.APPLICATION_JSON) @Consumes(MediaType.APPLICATION_JSON) public Response register(UserRB userRB) { …
Béla Olcsán
  • 705
  • 1
  • 7
  • 12
1
vote
1 answer

Ruby Gem Rest-Client vs cURL, HTTP 415

I have a cURL call that works but when I translate it using the Ruby Gem rest-client I get: RestClient::UnsupportedMediaType: 415 Unsupported Media Type Here is the cURL I used that worked: curl \ -X POST \ -H "Content-Type:application/json" \ -H…
Tony
  • 133
  • 2
  • 11
1
vote
0 answers

415 Media Type is Unsupported for Multipart/Related or multipart/form-data in C#(ASMX) WS

I have been using WS build on C# to send SOAP objects from Android application using KSOAP2 jar file. Currently my requirement is to send Image File(s) along with the SOAP Object in the same request. I do have found that my request should look a…
MKJParekh
  • 34,073
  • 11
  • 87
  • 98
1
vote
0 answers

Spring MVC Rest WS 415 Unsupported Medija Type JSON One to Many

Hello guys I'm pretty desperate right now. I tried all the solutions and nothing works. This is situation. I'm trying to make a POST request to create a new entity. Everything worked when I had a table which didn't have any relationships and I sent…
Diamond
  • 41
  • 4
1
vote
1 answer

415 state file to upload with Glassfish 4 and Java EE 7

Good afternoon, I hope you can help me. I'm trying to send a form with the xhr object. I have this in my html page

Choose a file :

1
vote
2 answers

How to automatically map JSON to Java Class in Spring Controller

I have got the following code: public class MyClass { String xxx; String yyy; public String getXxx() { return xxx; } public void setXxx(String xxx) { this.xxx = xxx; } public String getYyy() { …
ruhungry
  • 4,506
  • 20
  • 54
  • 98
1
vote
1 answer

Knockout.js sends weirdly formatted JSON data

I'm a beginner in a Knockout.js and I'm having a problem with sending data to the server. On my back-end I have REST-service: @POST @Produces({MediaType.APPLICATION_JSON}) @Consumes({MediaType.APPLICATION_JSON}) @Path("/smth") public Response…
1
vote
1 answer

Getting HTTP Status 415 sending a post request to Jersey RESTful service

I'm sending a 'POST' request containing a JSON object converted to JSON from my Knockout observable via ko.toJSON method. I send it using Amplify. This is my Amplify setting: amplify.request.define('addContract', 'ajax', { url:…
Pejman
  • 3,784
  • 4
  • 24
  • 33
1
vote
4 answers

415 Error when posting JSON in Java with Jersey

I have looked through Google, and at other questions here, to no avail. They all say the same things... Import the .jar for jersey-json (done), add the dependency to pom.xml (done) and add the POJOMappingFeature to the web.xml (done), yet I am…
cren90
  • 1,367
  • 2
  • 17
  • 30
0
votes
0 answers

AngularJS - Getting 415 Unsupported Media Type error for $http.put method with encoded parameter

I have one endpoint(PUT method) '/api/updateCode' which is expecting a code as parameter that is in encoded format.('/api/updateCode/{code}' - sample swagger documentation) In the controller Im calling the endpoint like below controller.js…
knbibin
  • 1,099
  • 7
  • 18
  • 36
0
votes
1 answer

Accept text/plain while @Consumes has application/json

We migrated a DropWizard based REST service to Quarkus based one (version: 2.16.7.Final) using quarkus-resteasy-reactive extension. The APIs where the @Consumes annotation has application/json started failing in Quarkus with status code 415 (The…
0
votes
0 answers

Angular file upload throws error 415 'unsupported media type' & 'Missing or Invalid Url'

I am trying to upload a file with angular and spring boot, and it is throwing error 415 "unsupported media type" & "Missing or Invalid Url". The api works fine when tested with Postman. But in Postman also, we need to pass content type as…