From fdaf29d920d68925e96780c2af0ada32493c9ff6 Mon Sep 17 00:00:00 2001 From: Hayden Schiff Date: Thu, 21 Jan 2016 18:10:23 -0500 Subject: [PATCH] added lwp-request --- pages/common/lwp-request.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 pages/common/lwp-request.md diff --git a/pages/common/lwp-request.md b/pages/common/lwp-request.md new file mode 100644 index 0000000000..468f8ae5ec --- /dev/null +++ b/pages/common/lwp-request.md @@ -0,0 +1,27 @@ +# lwp-request + +> Simple Perl-based command-line HTTP client. + +- Make a simple GET request: + +`lwp-request -m GET {{http://example.com/some/path}}` + +- Upload a file with a POST request: + +`cat {{/path/to/file}} | lwp-request -m POST {{http://example.com/some/path}}` + +- Make a request with a custom user agent: + +`lwp-request -H 'User-Agent: {{user_agent}} -m {{METHOD}} {{http://example.com/some/path}}` + +- Make a request with HTTP authentication: + +`lwp-request -C {{username}}:{{password}} -m {{METHOD}} {{http://example.com/some/path}}` + +- Make a request and print request headers: + +`lwp-request -U -m {{METHOD}} {{http://example.com/some/path}}` + +- Make a request and print response headers and status chain: + +`lwp-request -E -m {{METHOD}} {{http://example.com/some/path}}`