Closed sviatcraft closed 2 years ago
Hi @sviatcraft ,
First you have to create variable from variable tab in the sidebar(next to collection tab) and then click attach variable. In the attach variable screen, you can select above created variable in the drop-down and choose it. Now all requests under the collection is attached with the variable.
@Ganesan-Chandran Thanks for your response. I was able to attach variables! My problem was that I had only "Global", and it can not be attached. After creating new variables I was able to attach them.
All my requests will need the token
token
is provided as a response to request "api/auth"
Is there a way to use this token in response for all other API requests?
I am trying to do this like this: 1) Do auth request 2) Copy token into variable 3) Use variable for token in other requests (Authorization Type: Bearer Token)
Result: getting 401 errors. Looks like variables can not be used for token. When I am adding token value directly (without variable) it works
Any advice?
-
Hi @sviatcraft ,
Global variable is default variable. If you have activated global variable then, it will attached automatically for all request (except the requests which variable attached explicitly). If you want to check current attached variable for request then, click settings icon (Gear Icon) in the request section.
Fetch Client v1.1.0 has released
Please update the Fetch Client and let me know if you have any queries/feedback.
Thanks :-)
Looks good, nice job :)
I might have a bug, I described it here https://github.com/Ganesan-Chandran/vscode-fetch-client/issues/4
Thanks @sviatcraft . I am closing this issue and continue discussion on #4.
Hi, There is a feature "Attach Variable". It is inside Collection menu. How can I use it?
When I click on variable select I see nothing, select is empty.
Can I add more collections?
I have multiple requests. Each of them would need auth token. I assume that "Attach Variable" is a way to use token for all collection requests.