Vscode-restclient: Feature Request : Manage input params visually.

Created on 13 Nov 2017  ·  7Comments  ·  Source: Huachao/vscode-restclient

Is there any way to show inputs visually as shown in the image?

screen shot 2017-11-13 at 5 44 32 pm

Or at least there should be a way to temporarily toggle input fields.

enhancement

Most helpful comment

@shahidmau newline is only supported for query string, not request body, when you use raw http format, not for curl format, can you succeed in raw http format? And I think it's really a great idea to add a shortcut to spread query parameters in a single line to multiple lines.

All 7 comments

@shahidmau the most similar way is to make each query parameter in each line like:

GET https://example.com
    ?location=xxx
    &platform=yyy
    &language=zzz

And then manually comment(# or //) or uncomment the line you want to achieve this like following:

GET https://example.com
    ?location=xxx
    # &platform=yyy
    &language=zzz

Good idea but manually doing it for big query is a painful job, kindly provide a shortcut key to arrange the inputs in the suggested way. Thanks :)

@shahidmau what kind of shortcut key do you need, since move query line ,comment/uncomment line is natively supported in vscode

Suppose we have a query like this

GET https://example.com?location=xxx&platform=yyy&language=zzz

On pressing shortcut key it should become like this.

GET https://example.com
?location=xxx
&platform=yyy
&language=zzz

It will become easy to comment/uncomment a single param value. It will be very useful command if query is too big (more than 20 params). Manually formatting will take time while it can be done by pressing a command.

I just checked and found that new line is not working for post method :(

curl 'http://my-api.com/search' -H 'Pragma: no-cache' -H 'Origin: http://http://my-api.com' -H 'Accept-Encoding: gzip, deflate' -H 'Accept-Language: en-GB,en-US;q=0.9,en;q=0.8' -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/23.213.2.21 Safari/537.36' -H 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8' -H 'Accept: application/json, text/plain, /' -H 'Cache-Control: no-cache' -H 'Referer: http://my-api.com/search' -H 'Connection: keep-alive' --data
'location=243,32,32
&platform=12,23,5

&language=324,232,32

&duration=14
&keyword=1,2,3,
&boolean=34,32
&orderBy=post.published_date
&order=desc
&company=testcompany
&offset=1
&recordsPerPage=50
&access-token=123'
--compressed

@shahidmau newline is only supported for query string, not request body, when you use raw http format, not for curl format, can you succeed in raw http format? And I think it's really a great idea to add a shortcut to spread query parameters in a single line to multiple lines.

+1

Was this page helpful?
0 / 5 - 0 ratings