Huachao / vscode-restclient

REST Client Extension for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=humao.rest-client
MIT License
5.31k stars 444 forks source link

allow generation of posted data with unix pipes #248

Open jum opened 6 years ago

jum commented 6 years ago

I did some testing of a new rest service that needs a special compressed data on a post. This all fine as I can read the body using "< ./postdata", but it would be really helpful to be able to generate the data on the fly. A good way would be if I could use something like this:

###
POST {{url}} HTTP/1.1
Content-Type: application/octet-stream

| gendata "various program arguments"
###
Huachao commented 6 years ago

Really an interesting idea, I will consider this carefully. Could you please also show me your use case?

KonnosPB commented 4 years ago

hello everybody, I could use this feature, too. My scenario is an upload of a so-called configset into a solr search engine environment.

The tutorial here looks like this $ (cd solr/server/solr/configsets/sample_techproducts_configs/conf && zip -r - *) > myconfigset.zip

$ curl -X POST --header "Content-Type:application/octet-stream" --data-binary @myconfigset.zip "http://localhost:8983/solr/admin/configs?action=UPLOAD&name=myConfigSet"

Source: https://lucene.apache.org/solr/guide/8_2/configsets-api.html