Questions tagged [http-status-code-406]

The HTTP response status code 406 Not Acceptable

The requested resource is only capable of generating content not acceptable according to the Accept headers sent in the request.

See also RFC2616.

176 questions
2
votes
1 answer

Why i receive HttpClientErrorException 406 if mediaType is set?

Collegues, i have the method which should send post request into web service public void postPmnt(Document doc) throws TransformerException, HttpServerErrorException { RestTemplate rt = new RestTemplate(); String uri = new…
May12
  • 2,420
  • 12
  • 63
  • 99
2
votes
1 answer

AngularJS 406 not acceptable http post request

I have a problem with a Post query that I use for a form. I get a "406 not acceptable" error every time I try to validate my form, and Object.data is blank.. var edit = function(form){ var token =…
DaxDev
  • 651
  • 6
  • 13
2
votes
2 answers

Unauthorize response turning into 406 using OData

I just upgraded to Microsoft.AspNet.OData v6.0.0, and started encountering 406 status codes. I was able to fix most of them by changing using System.Web.Http.OData; to using System.Web.OData;, however I'm still having issues with custom error…
Brett Allen
  • 5,297
  • 5
  • 32
  • 62
2
votes
6 answers

PHP - Not Acceptable - 406 - file could not be found on this server

I am getting this error Not Acceptable An appropriate representation of the requested resource /admin/prc_res.php could not be found on this server. Additionally, a 406 Not Acceptable error was encountered while trying to use an ErrorDocument…
A B Catella
  • 308
  • 4
  • 12
2
votes
0 answers

XMLHttpRequest - PHP http 406 error

I am trying to consume a PHP service using XMLHttpRequest in Javascript. Receiving following error: XMLHttpRequest cannot load http://***/adService.php. Response for preflight has invalid HTTP status code 406 Earlier I had CORS error which was…
Abhinav Tyagi
  • 5,158
  • 3
  • 30
  • 60
2
votes
0 answers

Why is PHP cURL on Linux changing the Content-Type request header?

It seems PHP's built-in cURL module changes the header fields before sending them. I developed a small class to communicate with an encoder device trough HTTP requests, using cURL to do the task. The code works fine under Windows, however, when I…
Gergely Lukacsy
  • 2,881
  • 2
  • 23
  • 28
2
votes
2 answers

Spring MVC: jackson-mapper-asl not work with Spring 4

I am trying to convert List of objects into json with the help of jackson-mapper-asl libraries, but in response i got http 406 error. jackson-mapper-asl libraries are on my class path. Following is my Spring MVC controller code:…
Harmeet Singh Taara
  • 6,483
  • 20
  • 73
  • 126
2
votes
2 answers

Receiving 406 Status Code error when using MVC4+OData+Queryable

I'm stuck with the simplest OData scenario on MVC4 and .NET4. This is my WebApiConfig file: config.IncludeErrorDetailPolicy = IncludeErrorDetailPolicy.Always; ODataConventionModelBuilder builder = new ODataConventionModelBuilder(); …
2
votes
0 answers

POST request returning 406 error

I am using processing to do a simple POST request on a server. I have tried with many accept header configurations and I keep getting Error - 406 Not Acceptable. However, when I do requests with postman (chrome plugin) I get no errors. I get errors…
Sergio
  • 377
  • 1
  • 3
  • 18
2
votes
1 answer

: cause 406 Not Acceptable

I get 406 Not Acceptable on: /process.php?return=http://blog but not on: /process.php?return=http//blog only difference is : How can I solve it?
Mohammad Ali Akbari
  • 10,345
  • 11
  • 44
  • 62
2
votes
1 answer

Rails, Devise Invitations 406 Unacceptable error with STI

There are similar questions but I've gone over them and none of them have applied. I am using Devise and Devise invitations. Rails 3.2.6. The tricky thing is I have two user models. User and a single table inheritance setup where Artist inherits…
ScotterC
  • 1,054
  • 1
  • 10
  • 23
2
votes
2 answers

Which Status Code for "client requested wrong format"?

Which HTTP Status Code is the best to use for "Client requested a wrong format", e.g. the client requested format=json and the data is only available as XML? I tend to use 406 but this refers to the Accept heders, whereas the format is given as…
Florian
  • 3,145
  • 1
  • 27
  • 38
2
votes
1 answer

An appropriate representation of the requested resource /page.php could not be found on this server

In a page in my website I have a link as below: Go to the page.php When I click the link, I get the following error: 406 Not Acceptable An appropriate representation of the requested resource /page.php could…
Alireza
  • 6,497
  • 13
  • 59
  • 132
1
vote
0 answers

Avoid 406 error when using GET method in API testing with Cypress

I would like to test the api of an application, I've got a token from the developer, but I'm getting an error 'cy.request() failed on: https://****************************** The response we received from your web server was: 406: Not…
1
vote
2 answers

How to access a website that gives UnAcceptable error message: 406?

After searching 100s of answers, I'm here again, asking new question that might help someone in the future. I'm scraping this website: https://inview.doe.in.gov/state/1088000000/school-list. The school list is in a flex box and I believe that I can…
1 2
3
11 12