Skip to content
Sergey Mudrik edited this page Aug 2, 2016 · 13 revisions

Examples usages for shell2http

Clone *.jpg.to service

Get first image from image search

shell2http -cgi / 'curl -Ls https://yandex.ru/images/search\?text=$(echo $PATH_INFO | sed "s/\///") | perl -nE "m/class=.serp-item__thumb.+?src=.(\S+).\s/; say \$1 if \$1" | xargs -I@ curl -Ls https:@'

And get images from http://localhost:8080/cat, http://localhost:8080/dog, http://localhost:8080/github ...

Add CORS header, for get data from another host

shell2http -cgi /data "echo "Access-Control-Allow-Origin: *\n"; echo 'some data for another host'"

Clone this wiki locally