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

Add HTTP headers to requests #13

Open
rp-eric opened this issue Oct 24, 2014 · 5 comments
Open

Add HTTP headers to requests #13

rp-eric opened this issue Oct 24, 2014 · 5 comments

Comments

@rp-eric
Copy link

rp-eric commented Oct 24, 2014

The feature proposed is to add to the user interface inputs which allow the addition of HTTP headers to requests. Such a capability is required for services which use the Authorization or other custom header for authentication.

@lanthaler
Copy link
Owner

Yeah, good idea. Were you thinking of headers on a request level, i.e., add fields to the operation pop-over, or globally? PRs are welcome btw.

@rp-eric
Copy link
Author

rp-eric commented Nov 6, 2014

I have started working on this feature on issue_13 branch of my fork. I was stopped because there is a significant problem with how expanding the JsonLD works.

Particularly, FileGetContentsLoader.php is used by the JsonLD library to automatically resolve URIs. I am not sure how custom HTTP headers would be added to such a thing. Perhaps adding custom headers to those requests will not be part of this feature.

For my particular case I have all files, including the contexts, behind authorization. The context files are not sensitive information however so with a bit of work I can just lift the authorization requirement on them.

@lanthaler
Copy link
Owner

Sorry for the late reply. Indeed, this may cause problems in this case. It would, however, be quite simple to create a separate document loader which sends the right headers. This should actually be configurable in the JsonLD library but I haven’t found the time yet to implement that. If you have a couple of hours, you could look into that. It should be quite straightforward. It’s basically an implementation of this flag in the JSON-LD API spec: http://www.w3.org/TR/json-ld-api/#widl-JsonLdOptions-documentLoader

@ogizanagi
Copy link

Hi. Is there any progress status about this feature request ?

@lanthaler
Copy link
Owner

No, unfortunately not. I couldn't find time to work on this.

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

No branches or pull requests

3 participants