![]() Http -session=/tmp/session.json http -session=/tmp/session.json -session=~/.httpie/sessions//test.json http -session-read-only=/tmp/session.json Ĭheck out the HTTP command documentation. This allows for sessions to be re-used across multiple hosts: # Instead of a name, you can also directly specify a path to a session ![]() Http -session=user2 -a user2:password X-Bar:Foo # To create or reuse a different session, simple specify a different name: # authorization and HTTP headers will automatically be set: # Now you can refer to the session by its name, and the previously used Http -session=user1 -a user1:password X-Foo:Bar Http -stream -f -a YOUR-TWITTER-NAME track=Apple | while read tweet do echo "$tweet" | http POST /tweets done # server as soon as it arrives from the Twitter streaming API: # Send each new tweet (JSON object) mentioning "Apple" to another Http -stream -f -a YOUR-TWITTER-NAME track='Justin Bieber' # support that, the whole file will simply be downloaded: # Range requests and 206 Partial Content responses. This only works with servers that support # If -output, -o is specified, you can resume a partial download using ![]() # response headers and progress are still shown in the terminal: # You can also redirect the response body to another program while the # to the terminal (stderr), and a progress bar is shown while the response # When enabled using the -download, -d flag, response headers are printed # Force colorizing and formatting, and show both the request and the Http /images/original.jpg | convert -resize 25% - | http /Octocats # Download an image of Octocat, resize it using ImageMagick, upload it Http PUT /person/1 name=John age:=29 married:=false hobbies:='' bookmarks: # Non-string fields use the := separator, which allows you to embed raw # Set a custom Host header to work around missing DNS records: HTTPie is designed for testing, debugging, and generally interacting with APIs & HTTP servers. Its goal is to make CLI interaction with web services as human-friendly as possible. Version: 3.2.1 (latest) HTTPie (pronounced aitch-tee-tee-pie) is a command-line HTTP client. # http -session=logged-in -a username:password /get API-Key:123 Edit on GitHub v3.2.1 docs updated: yesterday. # persistent between requests to the same host: # Use named sessions_ to make certain aspects or the communication Http -a USERNAME POST body='HTTPie is awesome!' # Use Github API to post a comment on an issue with authentication: # See the request that is being sent using one of the output options: # Custom HTTP method HTTP headers and JSON data:
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |