Closed satra closed 4 years ago
No special treatment for schema.org, in fact, they complain about needing to respond to the Accept header to redirect.
Make sure your server is properly set up to honor the content-negotiation on Accept: application/ld+json
. When I run the following:
curl -H 'Accept: application/ld+json' https://schema.repronim.ortivities/AdultSelfReport
It returns JSON-LD. Perhaps you're getting other headers that are affecting the way you send results. Can't tell on this end. Many services will send several Accept types, and one of those could be affecting what you return. Best examine your log files. I see similar issues running it through my own service at http://rdf.greggkellogg.net/distiller.
thank @gkellogg - will keep debugging at our end. will close this for now, and will post back if we find a solution (or the actual problem).
We are observing some differences in retrieving jsonld documents between schema.org and our server. We would like to know if we should be implementing content negotiation differently on our server.
on our server this:
curl -H "Accept: application/ld+json" https://schema.repronim.org/rl/activities/AdultSelfReport
works and without the accept header will return an html landing page. we also support adding.jsonld
at the end of the url similar to schema.org (https://schema.org/docs/developers.html).does jsonld.js treat schema.org specially?
here are some details. please click on the triangles to expand.
content negotiation on schema.org
```node > jsonld.expand('https://schema.org/option').then((resp) => { console.log(resp);}) Promise {content negotiation fails on our server
```node > jsonld.expand('https://schema.repronim.org/rl/activities/AdultSelfReport').then((resp) => { console.log(resp);}) Promise {but works on our server when we make it explicit
```node > jsonld.expand('https://schema.repronim.org/rl/activities/AdultSelfReport.jsonld').then((resp) => { console.log(resp);}) Promise {