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

Python - Web Scraping Code Error - HTTP Error 406: Not Acceptable

I'm trying to learn basics of Python & I came across this exercise in a book on how to do Web Scraping. I tried to replicate the code but getting this error- "urllib.error.HTTPError: HTTP Error 406: Not Acceptable". Is there anything wrong with the…
Raj K
  • 13
  • 1
  • 3
1
vote
1 answer

Rails 3 integration test fails with 406 response for simple html request

I have an integration test the sends a simple GET request to the 'show' action. I get a when I assert_response :success, it fails because the response is a 406, which means the format is Not Acceptable HTTP. require 'test_helper' class…
1
vote
2 answers

POST a document to an Elasticsearch index using requests?

I am having difficulties with this: all the following return 405, and I have no idea why: data = { "xxx" : "status", "value" : "incomplete" } headers = {'Content-type': 'application/json'} response =…
1
vote
1 answer

How can i make the page accept the mimetype in asp.net

I have my own webshop set up with a payment provider and to finalize the buy they send me a post to a page with some data for me to acknowledge the order. The problem is that when they do the request it returns a 406 error for them. This is what i…
Jimmy
  • 275
  • 2
  • 6
  • 27
1
vote
1 answer

Serverside debug Django "Not Acceptable"

When calling an URL on my Django API it returns: [04/Sep/2021 08:14:47] WARNING [django.request:224] Not Acceptable: /api/calendar/test.ics Calling the same URL from PostMan (or curl) returns a simple iCal file so the URL is valid and…
DIJ
  • 347
  • 4
  • 19
1
vote
1 answer

'406 Not Acceptable' after scaping web using python

The website i scapped blocked me out by showing 406 Not Acceptable on the browser. It might i mistakenly sent too many requests at once on phython code. So i put time.sleep(10) for each loop to not make it look like a DDoS attack, and it seems…
laph
  • 2,925
  • 2
  • 18
  • 18
1
vote
1 answer

Fetch failed with protocol status: exception(16), lastModified=0: Http code=406, url=https://www.randolphnj.org/

I am trying to crawl url: https://www.randolphnj.org/ But it is showing this error 2020-09-22 15:03:08,395 INFO httpclient.Http: http.accept = text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 2020-09-22 15:03:08,395 INFO…
Ravi Kiran
  • 65
  • 6
1
vote
1 answer

Express Node.js Cors preflight issue 400 net::ERR_FAILED

I have been banging my head against the wall for hours now... tried every type of combination to get this working. I have my own API endpoint here: https://app.automate.mn/api/tools/email/add Which I am trying to post data to from 3rd party…
Andy
  • 59
  • 2
  • 11
1
vote
4 answers

Getting HTTP 406 while calling external site from within servlet

I have the following code in my servlet: /** * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response) * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response) */ public void…
Rob The Ranger
  • 389
  • 1
  • 3
  • 17
1
vote
0 answers

Why getting 406 Not Acceptable in ASP.NET Core 2.1.3 web api?

My action method: [Authorize] [HttpGet] [Produces("text/xml")] public async Task GetJobs(GetJobsForThirdPartyQuery query) { var response = await this.Bus.Query(query); …
Towhid
  • 1,920
  • 3
  • 36
  • 57
1
vote
1 answer

Shopify API, 406 response for PUT request from Google Apps Script UrlFetchApp

I am building a Google Apps Script script that connects to the Shopify API to create new products and/or update existing products from a spreadsheet. I have been successful at connecting to the API for GET requests (list all products) and POST…
1
vote
2 answers

The remote server returned an error (406) campaign monitor

I am using create-sent.net version 2.2 for CampaignMonitor. But recently I get this error: System.Net.WebException: The remote server returned an error: (406) Not Acceptable. at createsend_dotnet.HttpHelper.MakeRequest[T,U,EX](String method,…
1
vote
1 answer

Jooby Webserver Always throwing error "406 Not acceptable: text/html"

I'm setting up a simple Jooby Webserver. I have a App.java and a home.html file. For now, the only thing i want it to do, is that if you open the home page it shows a html page saying "Hello World". However, I'm always getting the error…
abilnf
  • 67
  • 8
1
vote
0 answers

EventSource in Angular 6 with JWT - 406 Not Acceptable

I would like to detect events from a URL address in my web application. I implemented it with Spring (backend) and Angular (frontend). I use JWT to sign in. In one of the components, I want to check if a POST method was sent by some user (to check…
plkpiotr
  • 345
  • 2
  • 9
  • 23
1
vote
1 answer

Spring-boot Actuator endpoints - 406 Not Acceptable

I am getting a 406 Not Acceptable error for my spring-boot actuator endpoints like /health, /env, /info etc I am using spring-boot version 1.5.8 Accessing endpoints like http://localhost:6061/health http://localhost:6061/env Here is bits of my…