rubensworks / fetch-sparql-endpoint.js

A simple, lightweight module to send queries to SPARQL endpoints and retrieve their results in a streaming fashion.
MIT License
22 stars 13 forks source link

Add default headers to constructor #62

Closed mielvds closed 1 year ago

mielvds commented 1 year ago

Adds support for custom headers as proposed in #53. From looking at the existing code, I positioned the change as default headers that get overridden when actually fetching.

I was also wondering whether acceptHeader in https://github.com/rubensworks/fetch-sparql-endpoint.js/blob/master/lib/SparqlEndpointFetcher.ts#L177 should not better generalized to an optional customHeaders object?

coveralls commented 1 year ago

Pull Request Test Coverage Report for Build 5046704468


Totals Coverage Status
Change from base Build 4464535117: 0.0%
Covered Lines: 85
Relevant Lines: 85

💛 - Coveralls
rubensworks commented 1 year ago

Thanks @mielvds! :-)

Released as 3.3.0.

I was also wondering whether acceptHeader in https://github.com/rubensworks/fetch-sparql-endpoint.js/blob/master/lib/SparqlEndpointFetcher.ts#L177 should not better generalized to an optional customHeaders object?

There may be some improvements possible there. But since that method is mainly being used internally, this doesn't seem urgent to me.