Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 02:19
    Huachao commented #434
  • Oct 22 22:03
  • Oct 22 14:37
    Huachao labeled #435
  • Oct 22 14:36
    Huachao edited #435
  • Oct 22 12:27
    mburleigh commented #434
  • Oct 22 06:37
    wujunchuan opened #435
  • Oct 22 01:35
    Huachao commented #434
  • Oct 21 18:51
    mburleigh opened #434
  • Oct 21 08:58

    Huachao on master

    Remove unused code (compare)

  • Oct 21 05:43
    Huachao commented #281
  • Oct 20 22:35
    jspronk commented #281
  • Oct 20 19:53
    davidjbng starred Huachao/vscode-restclient
  • Oct 19 08:57
  • Oct 18 06:26
    jdomzhang starred Huachao/vscode-restclient
  • Oct 17 11:32
    harshavamsi starred Huachao/vscode-restclient
  • Oct 17 11:13
    mattwaler commented #418
  • Oct 17 07:19
    Huachao closed #418
  • Oct 17 07:19
    Huachao commented #418
  • Oct 17 07:15

    Huachao on master

    Add native .env file support #4… (compare)

  • Oct 17 07:10
    jaronsoft starred Huachao/vscode-restclient
venkatasrinivasnamburi
@venkatasrinivasnamburi
Going through the documentation and figured out that custom Variables could be used. Thank you for providing this chat Window anyways!
Huachao Mao
@Huachao
@venkatasrinivasnamburi you
could use the request variable to achieve it.
Gabor Verebes
@verebes
Hi! I have a problem with my proxy setting. We have a corporate proxy, so I set ["localhost"] for excludeHostsForProxy property, but the requests still go to the proxy. Is this a known issue, or I miss something?
Mike Chelen
@mchelen
Hello, when will a new release be published with the latest commits? Trying to decide if its worth installing from git master branch
Huachao Mao
@Huachao
@verebes Hi, where did you set the proxy setting, in VSCode or environment variables on your machine?
@mchelen Hey, I plan to publish a new release later this week.
Mike Chelen
@mchelen
@Huachao great to hear, thanks for the update!
would it be helpful to have a travis config for continuous deployment?
snarum
@snarum
Newbie problem here. I try to call a simple endpoint on my localhost iis express, but get 502 Connection Refused. pasting the same url into chrome returns a good value. Something I have been missing?
snarum
@snarum
figured it out. needed to add 'localhost' to rest-client.excludeHostForProxy
epnasis
@epnasis
I have issue with Authorization: {{$aadToken}} header - I get pop-up to login but browser does not open and code is not copied to clipboard like it used to - is that some new known issue?
Huachao Mao
@Huachao
@epnasis I can't reproduce your issue, can you show me your request, and please also check the console output with the command Developer: Toggle Developer Tools?
Nolan Darilek
@ndarilek
Hey, VSCode newbie here, so apologies if this is an obvious question. I'm trying to set this up for an API with multiple environments. So far so good, I have a .vscode/settings.json that defines this. Next I want to add a username/password variable so we can test authenticated requests. This should be set to the user's own credentials, and should not get committed. How can I do this?
I don't want to add this to the .vscode/settings.json to avoid accidental commits, nor do I want it as a file variable, since then it might get accidentally committed as well. I found a VSCode issue for separate settings.json and settings.user.json files, but it was closed.
And maybe there's a better way to do this, which is fine. I guess we could create test credentials, but then we'd have those test credentials in the repo, and since our repo is public, I want to avoid that.
Nolan Darilek
@ndarilek
Also, I like using this to explore and document a mostly undocumented API--currently using this to capture API results and compare them across environments. Eventually I'm going to need to run the same request in local and dev environments to compare their results. Does anyone have tips on how to do this? Can I open the .http file read-only twice in separate environments, then somehow diff the results? Or can I somehow run all the requests in a single file, output the results to disk, switch environments, then do the same? Then I could take a diff via, well, diff. :)
Huachao Mao
@Huachao
@ndarilek if you want you make your credentials not committed in to Git, currently one possible way is to add this your environment variables setting not into your .vscode/settings.json but in the User settings(which is a global setting and you can follow the instructions here)
@ndarilek for your second question, there seems no appropriate way to achive this.
Nolan Darilek
@ndarilek
Ah, so it'd have to be in the global settings. Hmm, wonder if it might be useful to have a variable that prompts the user for a value, then caches that value for the session? I wish there were user-specific workspace settings, trying to think of an elegant workaround.
Huachao Mao
@Huachao
@ndarilek nice suggestion, I will consider if we have a better solution
Nolan Darilek
@ndarilek
Hmm, for my other issue, what about a command to run any requests that are selected? Then I could highlight some or all requests in a file, hit a key, and run them all with some level of parallelism? If that seems sensible, any idea how hard it'd be to implement? If not very, I might be interested in trying it, VSCode extensions look interesting.
Ezequiel Surijon
@esurijon
@Huachao, such a great plugin. I seems that the plugins does not support sending "application/x-ndjson" content type, it misses to send last empty line in order to mark end on payload. https://github.com/ndjson/ndjson-spec
YibuMe
@jjeejj
When requesting a file, how to save it to hard disk?
Huachao Mao
@Huachao
@jjeejj do you mean save the response to hard disk, if so, in the response preview panel, click the Save Response or Save Response Body icon in the upper right corner of the panel.
@esurijon nice suggestion, this has been mentioned in Huachao/vscode-restclient#292 and I will implement this ASAP.
Huachao Mao
@Huachao
@ndarilek similar issues have been proposed in GitHub, and I have two concerns
  1. Since requests in the same file may have dependency, so we will need to ensure the trigger order
  2. How to display all the responses
David Gonçalves
@DJGoncalves_twitter
Hi @Huachao , thanks very much for such a wonderful tool!
Is there any way to use
HMAC?
Huachao Mao
@Huachao
@DJGoncalves_twitter currently it's not supported out of box. You could create an issue in GitHub, and I will track it and update in that thread for any updates. Thanks.
dc
@dcsan
sorry stupid question, but how do I get started with this extension? I created a text file ( .txt ) also tried as a .sh with a few links or with GET ....
but I don't see any way to apply the rest-client extension to that file?
image.png
guess its available from the command menu, but is there a way to set a 'filetype' recognition to trigger the rest-client plugin?
Huachao Mao
@Huachao
@dcsan
set the file extension to .http
dc
@dcsan
awesome thanks! do you want me to send a PR for the README?
also is there anyway to use this for simple tests? ie to add some type of expect( .. ) on the results
Huachao Mao
@Huachao
@dcsan test is not supported now, and it is an expected feature. Please feel free to creat PR
belagangal
@belagangal

Hi I'm using VS Code REST Client Version 1.36.1 (1.36.1). I'm trying to send a multipart/related POST request but getting 400 error. Can you help me figure out what's wrong in the request? It works fine in Restlet Client (Chrome)

Provision the admin

POST https://<server URL>
Authorization: Bearer {{token2.response.body.access_token}}
Content-Type: multipart/related; boundary=account_part; type=application/json

--account_part
Content-ID: tradingPartner
Content-Type: application/json

{"name":"General1 Hospital","address":{"street":"2000 Walnut Avenue","city":"Fremont","state":"CA","zip":"94538","country":"USA"},"contact":{"firstName":"GH","lastName":"Admin","email":"test.test@gmail.com","phone":"78978978"},"roles":["ADMIN"],"type":"EDD"}

--account_part
Content-ID: configuration
Content-Type: application/json
{"userQuota":1}

--account_part--

belagangal
@belagangal
@Huachao BTW, let me add that the Authorization part with bearer token has no issues. First I'm sending a POST request to a server to get the token (token2), and then sending this request to create an account. This approach works perfectly fine with another REST request for a different type of account creation where multipart/related is not involved. So since in this request it's not working I'm guessing that either multipart/related is not supported by this tool or if it is supported then there is some sort of syntax error in sending the request.
Huachao Mao
@Huachao
@belagangal My extension doesn't support the multipart/related well, and I already fixed and will publish in next release. And I also think you should add a blank line of your last part in your request body , that means add a blank line before {"userQuota": 1}. Thanks for reporting this. :smile:
belagangal
@belagangal
@Huachao Thanks for the response. I added a blank line as you suggested but that didn't make any difference.
Huachao Mao
@Huachao
@belagangal sorry, I didn't express myself clearly, it depends on my code fix, and I have fixed it early this morning, and I will publish this fix in next release. And then you can experience this. Sorry for the incovenience.
belagangal
@belagangal
@Huachao so when is the next release?
Huachao Mao
@Huachao
@belagangal Maybe sometime early next month
belagangal
@belagangal
ok, thanks.
Ramon Buckland
@rbuckland
Hi, Is there a way to load a file into a variable ?
Specifically - I have file contents that I need to drop into the value of the JSON. (neo4j query, inside the JSON API value)
Huachao Mao
@Huachao
@rbuckland currently it's not supported,