vsb icon indicating copy to clipboard operation
vsb copied to clipboard

change 'Accepts' to specific type in request header

Open nareike opened this issue 10 years ago • 1 comments

Short explanation: When using the AngularJS httpProvider, the default header for requests contains (see [1]):

Accept: application/json, text/plain, * / *

Note that there are no quality values. Some servers will not respect the order of the MIME types and will answer with any type of the highest quality.

This wouldn't be too bad if only the VSB (or rather jassa) could digest text/plain SPARQL results. Unfortunately, it cannot and throws an error. This commit fixes this behaviour.

  1. https://docs.angularjs.org/api/ng/service/$http

nareike avatar Sep 22 '15 12:09 nareike

This is also an issue for me as the endpoint I'm trying to use doesn't recognise the generic type application/json. Arguable the accept type should be application/sparql-results+json, application/*+json, application/json.

pulquero avatar Oct 03 '16 07:10 pulquero