-
Notifications
You must be signed in to change notification settings - Fork 137
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
Import and save body parameters #47
Comments
Hi @violabg what version of Thunder Client are you using, as it is fixed in v1.0.7 import postman body params. The form tab should not be changed when you make a request, what ever tab is active in body, it will take data from it and ignore data from other tabs. Can you re-rest again and let me know, if you can share a sample postman file without any sensitive info, i will also test it and find out the issue. |
I'm using 1.0.7 this is my collection that I'm having problems with {
"client": "Thunder Client",
"collectionName": "xxxxxxxx",
"dateExported": "2021-04-25T10:10:23.102Z",
"version": "1.0",
"requests": [
{
"headers": [
{ "name": "Content-Type", "value": "application/x-www-form-urlencoded" }
],
"colId": "d7dee309-e853-4f3f-9d53-a244a719acb8",
"name": "oauth/token",
"url": "{{baseUrl}}/oauth/token",
"method": "POST",
"modified": "2021-04-25T10:10:14.754Z",
"created": "2021-04-25T10:07:05.471Z",
"_id": "0544b444-ac5e-4b17-b29f-2b4b635bad46",
"body": {
"type": "formencoded",
"raw": "",
"form": [
{ "name": "grant_type", "value": "password" },
{
"name": "client_id",
"value": "xxxxxxxxxxxxxxxxxxxxxx"
},
{ "name": "client_secret", "value": "xxxxxx" },
{ "name": "username", "value": "norris" },
{ "name": "password", "value": "changeme" },
{ "name": "scope", "value": "app_user tenant_manager customer" }
]
},
"tests": [
{
"type": "set-env-var",
"custom": "json.access_token",
"action": "setto",
"value": "{{token}}"
}
]
},
{
"headers": [],
"colId": "d7dee309-e853-4f3f-9d53-a244a719acb8",
"name": "{{baseUrl}}/api/v1/vrtimeline",
"url": "{{baseUrl}}/api/v1/vrtimeline?_format=json&app_nid=625&start_date=1599820699654&end_date=1600165468583&type=stats",
"method": "GET",
"modified": "2021-04-25T10:08:59.681Z",
"created": "2021-04-25T10:07:05.471Z",
"_id": "ab488c77-01db-4dc0-8fdf-8b313d6699cd",
"auth": { "type": "bearer", "bearer": "{{token}}" },
"tests": []
},
{
"headers": [],
"colId": "d7dee309-e853-4f3f-9d53-a244a719acb8",
"name": "{{baseUrl}}/api/v1/vrsession",
"url": "{{baseUrl}}/api/v1/vrsession?_format=json&sessionid=1d16cb28-e6c0-4529-8493-70ea9856092d100211615547379152-0",
"method": "GET",
"modified": "2021-04-25T10:07:05.476Z",
"created": "2021-04-25T10:07:05.476Z",
"_id": "23208974-5c48-45df-8266-f8857adac2cd",
"auth": { "type": "bearer", "bearer": "{{token}}" }
}
]
} no matter what every time I go to oath/token the body parameters are go, try to restart vscode. |
thanks i will test and get back to you |
Hi @violabg i have just executed the first request by changing url to https://httpbin.org/anything and then i closed the vs code and opened back. I can still see the body parameters am i missing any step to reproduce the issue? |
I think I got the problem, is my client_secret e3iL@'2iSM when I use it, send the request maybe is the ' character? |
if thats the only one parameter, then value could be the issue as i use regex for env variable replacement, |
yes, that's the problem, if I remove it or replace even with " it works. |
Ok I will try to escape it. |
Can you try adding a slash \ before single quote |
I did and is not working the request return an error and when I switch request and go back the params are empty again |
Ok I will fix it |
were you able to reproduce it? |
yes i can reproduce, when there single quote data is not loaded into form fields, when i remove quote data loaded properly, |
v1.1.0 is now published - details here #14 |
Is your feature request related to a problem? Please describe.
I have imported a collection from postman, but the body parameters (formdata) were not imported, so I added manually, but every time I go back to the request they are gone, and have to type them again, this is not very practical.
Describe the solution you'd like
Be able to import body parameters from postman and be able to keep them between vscode restarts and close/reopen request
The text was updated successfully, but these errors were encountered: