Simple container pretty-printing curl outputs.
10K+
Using pretty-printed curl outputs is useful for many different purposes ranging from dev testing all the way to customer demos. This image aims to provide the tools necessary to achieve just that.
The basic premise is to chain the following three commands:
curljson_pp / xml_pppygmentizedocker run -it jakubstas/pretty-curl
For adhoc testing, just chain the command manually like this:
curl -gX GET http://localhost:8080/Spring4WithSwagger/rest/users | \
json_pp | \
pygmentize -l json
producing this output:

curl -gX GET http://localhost:8080/Spring4WithSwagger/rest/products | \
xml_pp | \
pygmentize -l xml
producing this output:

To save some additional typing, you can utilize bash functions available in the image (producing the same results).
jcurl -gX GET http://localhost:8080/Spring4WithSwagger/rest/users
xcurl -gX GET http://localhost:8080/Spring4WithSwagger/rest/products
In case the application you want to query runs in your host operating system, just issue the following command. Such a container will share the network stack with the docker host and from the container point of view, localhost (or 127.0.0.1) will refer to the docker host.
docker run -it --net="host" jakubstas/pretty-curl
In case you are test the application from behind a proxy, just issue the following command.
docker run -it \
-e "http_proxy=http://<username>:<password>@<host>:<port>" \
-e "https_proxy=https://<username>:<password>@<host>:<port>" \
jakubstas/pretty-curl
Application used to test this image can be found on my personal GitHub.
Content type
Image
Digest
Size
151 MB
Last updated
about 10 years ago
docker pull jakubstas/pretty-curl