Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change 'Accepts' to specific type in request header #71

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

nareike
Copy link

@nareike nareike commented Sep 22, 2015

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

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
@pulquero
Copy link

pulquero commented Oct 3, 2016

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants