-
Notifications
You must be signed in to change notification settings - Fork 445
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
Use variables inside http/rest files #22
Comments
@Odonno , nice suggestion, however I think my goal now is a stand alone http client tool/extension, this feature can be implemented in you js code by referencing a javascript http client library. |
I think it would be just enough to be able build chains of requests in one input window.
If some kind of simple syntax could be developed, like:
|
@Huachao Yes, we can do that using a js library, now I see that. I just bring that question with potential usages but @shytikov seems to have one major needs, in case the response is highly variable (token example). Now, I think that introducing a script language is too much. Maybe global variables like What do you think ? |
@Odonno Yes, I totally agree, I'd like to add
|
Ability to set variable to result of HTTP request will be very helpful. |
@dcbrwn what do you mean the result of HTTP request, can you give me some samples, sorry |
For example I want to reuse auth. token in multiple requests. Like this maybe:
Some links for inspiration: Basically my intention is exactly the same as @shytikov's. |
@dcbrwn to make it work as restclient.el, I think we can achieve the same goal in a simpler way to implement, after we enabled add user's custom variables 😄 |
When can we expect to see the user custom variable feature? |
@jd987 I am a little busy recently, and haven't considered it carefully will fix this later. If you wish, you could help to contribute to the environment and variable feature, that will be a big welcome. Sorry for the inconvenience. |
Sorry but that is outside my area of expertise. I am eager to see this and context menu support. Wonderful plugin |
@jd987 I will implement the environment variables feature ASAP, and context menu support already published in version 0.11.4 |
@Huachao Thank you for the work done! I'll give a try as soon as I can. |
Can't wait!
…On Tue, Jan 10, 2017 at 2:06 AM, David Bottiau ***@***.***> wrote:
@Huachao <https://github.com/Huachao> Thank you for the work done! I'll
give a try as soon as I can.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#22 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AC0lH5RKxIuI_N3FcBRRmr3_brd0Vvcoks5rQzv3gaJpZM4JVnyI>
.
--
JD
|
Oops - my mistake, I was doing it wrong - I've edited this comment rather than just deleting... I thought this wasn't working
The problem is that I was doing it wrong. Based on what I read in comments I was trying to create variables in my test.http file, rather than in the settings and creating variables in the environment scope. Once the variables are created there, they work as expected. However, I'd love to be able to create variables in my test.http file if that's ever a possibility. Thanks for the great tool! |
@seanwcom this is a really interesting idea to define file scope variable, I will consider it in future release, thanks so much for your usage and suggestion. And one more thing, my preferred way to name a variable starts without $ sign, since I meant to preserve all the variables start with $ are global system variables, they will be replaced before custom variables, so if your variables conflict with global ones, global ones' value will be used |
Here is the complete tutorial for rest client - https://www.youtube.com/watch?v=Jf4SFY1yT1k |
Requirements:
The goal is to be able to make flexible REST client file. Adding variables, it could be simple to do those sort of things :
Tasks:
The text was updated successfully, but these errors were encountered: