Try http-prompt with interactive http access

I extended HTTPie and tried http-prompt which can access http interactively.

github

https://github.com/eliangcs/http-prompt

Installation

Use pip.

$ pip install http-prompt

Try to run

For the time being, try using an appropriate URL.

$ http-prompt http://qiita.com
Version: 0.2.0
http://qiita.com> 

I connected it like this.

Try to go to the URL of the elixir tag

It seems that the URL is moved by cd.

http://qiita.com> cd tags/elixir
http://qiita.com/tags/elixir>

I was able to move!

Get the data

It seems that you can get / post / head, so once you have a short response head

http://qiita.com/tags/elixir> head
HTTP/1.1 200 OK
Cache-Control: max-age=0, private, must-revalidate
Connection: keep-alive
Content-Encoding: gzip
Content-Type: text/html; charset=utf-8
Date: Fri, 20 May 2016 09:40:59 GMT
ETag: W/"be3f80696e432bac41b243aae48c7bc2"
Server: nginx
Set-Cookie: _qiita_login_session=L0xvRVMrazJkVXdia05obE5hYkxFZ3NZN3kvL2tZNVV4d0I5K1dOWG5seWl4TUNIYU5HYkNsQUFrVVRKQ2hGMm9KbXhMTHZyR08ycDN0OTlKbTFnejZxSzRJT3ErcnFOVjAwUWZaUlc5QjZHd2tHc05PNDU2TW03UzlNOW1CNkt1bGN2R2E0bzBQZzlBZ3JBSnBNK2JLYzhUN3o3MVhPQWFQOXFlUFBhVmVnaDZ1THBxUnBXbEpSK2h0eHFEeVZxLS12cXQ4UU9sV3lmKzI3OUxxemt3N3BBPT0%3D--85b79975eafdf0131bcc0a097269892b297bd80a; domain=.qiita.com; path=/; expires=Sat, 20 May 2017 09:40:59 -0000; HttpOnly
Vary: Origin
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-Request-Id: 5a666832-ac20-40d7-aca0-e033c5bf7e82
X-Runtime: 0.402365
X-XSS-Protection: 1; mode=block

It seems to be interesting like this, but if the character code is analyzed and the multibyte is displayed without garbled characters, it seems that the dialogue is meaningful.

Also, since I am using HTTPie, it seems that basically anything can be used with the httpie command.

Recommended Posts

Try http-prompt with interactive http access
[Continued] Try PLC register access with Python
Try scraping with Python.
Try SNN with BindsNET
HTTP communication with Python
Try regression with TensorFlow
Try to factorial with recursion
Try function optimization with Optuna
Accept external access with SimpleHTTPServer
Try deep learning with TensorFlow
Try using PythonTex with Texpad.
Try edge detection with OpenCV
Try implementing RBM with chainer.
Try Google Mock with C
Try using matplotlib with PyCharm
Try GUI programming with Hy
Try an autoencoder with Pytorch
Try Python output with Haxe 3.2
Try matrix operation with NumPy
Try implementing XOR with PyTorch
Try running CNN with ChainerRL
Try various things with PhantomJS
Try Deep Learning with FPGA
Try running Python with Try Jupyter
Try implementing perfume with Go
Easy HTTP server with Python
Access Google Drive with Python
Try Selenium Grid with Docker
Try face recognition with Python
Try OpenCV with Google Colaboratory
Testing HTTP requests with ESP-WROOM-32
Try machine learning with Kaggle
Try TensorFlow MNIST with RNN
Try building JupyterHub with Docker
Try using folium with anaconda