Giter VIP home page Giter VIP logo

rdf-fetch-lite's Introduction

RDF-Ext Fetch

Build Status npm version

This is the light version of the rdf-fetch package without the rdf-formats-common dependency. It can be usefully if you want to make a Browserify build with a reduced set of parsers and serializers. The formats options is required for this package. For further details see the rdf-fetch documentation.

rdf-fetch-lite's People

Contributors

bergos avatar

Stargazers

JMV avatar elf Pavlik avatar

Watchers

Reto Gmür avatar Adrian Gschwend avatar  avatar James Cloos avatar Nicola avatar

rdf-fetch-lite's Issues

No accept header set when fetching context

When fetching JSON-LD context, no accept header is set, which for example doesn't work at http://ld.stadt-zuerich.ch/context/flaechen.context.json

I'm not entirely sure what the correct thing to do should be (setting explicit options, pass through the options of the original request). In any case, setting {headers: {accept: 'application/ld+json'}} as fetch options works.

https://github.com/rdf-ext/rdf-fetch-lite/blob/9e574b83aa7d8d80c9ee41feb7141ee01de61dca/lib/patch-response.js#L31

Accept header being overriden

I'm using rdf-store-sparql, and it uses this library.
When i'm doing client.selectQuery(sparqlQuery, {headers:{'Accept':'application/sparql-results+json'}}), the header just disappears before the request is send

The line delete context.options.headers.Accept in patch-request.js deletes the right header and leaves me with text/turtle instead.

I've hardcoded a nasty fix

  if (context.options.accept === 'application/sparql-results+json'){
    delete context.options.headers.accept
  } else {
    delete context.options.headers.Accept
  }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.