Skip to content

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