mirror of
https://github.com/tldr-pages/tldr.git
synced 2024-11-02 03:17:58 +01:00
added lwp-request
This commit is contained in:
parent
c9d3e7d257
commit
fdaf29d920
1 changed files with 27 additions and 0 deletions
27
pages/common/lwp-request.md
Normal file
27
pages/common/lwp-request.md
Normal file
|
@ -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}}`
|
Loading…
Reference in a new issue