Rooyca / obsidian-api-request

Obsidian plugin that allows you to make requests to API's and receive responses in codeblocks or store them in localStorage.
https://rooyca.github.io/obsidian-api-request/
MIT License
78 stars 4 forks source link

[Feature Request] Auth/Headers support #4

Closed gtaylor90 closed 4 months ago

gtaylor90 commented 10 months ago

I saw auth support was crossed out in the README but was curious if request header support would be something on the roadmap.

Rooyca commented 10 months ago

I don't really remember why I crossed it out, but I think there was a problem with the implementation. I'll check again and let you know.

bryceprutsos commented 10 months ago

Just jumping in looking for this feature as well.

Most of my APIs need auth to retrieve the data.

Rooyca commented 9 months ago

I have added the first version of this feature (Header Auth). I would appreciate getting feedback from you all.

duniang818 commented 9 months ago

i send a post request with token to our company, but response is error, invalid parameter. but i send the same request with python, it is ok, the response is ok.

Rooyca commented 9 months ago

What method are you using? Try making the request using the modal... I belive it only works using the modal method.

Bodge-IT commented 6 months ago

So I'm using Token: <token>, seems to work but I can't get the results out in popup or paste. what's the :: variable option about?, I can't find anything on this. I'm trying to add apir api into daily template

Rooyca commented 6 months ago

So I'm using Token: <token>, seems to work but I can't get the results out in popup or paste.

Are you using the codeblock?

what's the :: variable option about?

That suppose to create a variable that could be access on the entire file. I don't remember getting it to work.

I'm trying to add apir api into daily template

Can I see the template format you are using?

Bodge-IT commented 6 months ago

Can I see the template format you are using?

Realised I can't use the template because I need authorisation which as I understand can only be passed in headers. That's why I jumped in on the request for referencing any saved apir within a code block. That just makes most sense...was surprised it didn't work like that.

Bodge-IT commented 6 months ago

Thanks for plugin though, it's a game changer if you can just get these last bits sorted... would tie all my workflow together!