vim-scripts / vim-http-client Goto Github PK
View Code? Open in Web Editor NEWMake HTTP requests from Vim without wrestling the command line!
Home Page: http://www.vim.org/scripts/script.php?script_id=5140
Make HTTP requests from Vim without wrestling the command line!
Home Page: http://www.vim.org/scripts/script.php?script_id=5140
This is a mirror of http://www.vim.org/scripts/script.php?script_id=5140 == Pretty description and demo at https://github.com/aquach/vim-http-client == Make HTTP requests from Vim with the HTTP format you already know, rather than wrestling with curl -X POST -b cookie=$1 -F csrf_token=$2 -F "request={\"user_id\":123}" http://example.org! Then parse the results right in Vim, syntax highlighted the way you expect! Usage Put your cursor anywhere in a newline-delimited block of text and hit <Leader>tt. vim-http-client will parse the text into a HTTP request, execute it, and display its results will appear in a split. You can also directly invoke the HTTP client with :call HTTPClientDoRequest()<cr>. The format mirrors HTTP's format: # Comments start with #. # First request. <method> <url> <header-name-1>: <header-value-1> <header-name-2>: <header-value-2> ... <header-name-n>: <header-value-n> <body> # Second request. <method> <url> <header-name-1>: <header-value-1> <header-name-2>: <header-value-2> ... <header-name-n>: <header-value-n> <body> Depending on where you put your cursor, the first or second request will execute. You can also substitute variables anywhere in the request: # Second request. # :foo = bar POST http://httpbin.org/post { "data": ":foo", "otherkey": "hello" } Each variable lives in a separate commented line and always starts with a colon. Variables are substituted with simple string substitution. If you'd like to pass form-encoded data, set your body like this: <key-1>=<value-1> <key-2>=<value-2> ... <key-n>=<value-n> See examples/examples.txt for more examples. The output appears in a new split. Based on the Content-Type header of the HTTP response, vim-http-client chooses a filetype for syntax highlighting. It currently supports XML, JSON, and HTML; all others will get ft=text. Configuration g:http_client_bind_hotkey (default 1) Controls whether or not <Leader>tt will run the HTTP client. Regardless of the setting, vim-http-client will not overwrite your existing <Leader>tt mapping if it exists. Contributing This plugin is currently quite simple. Contributions, suggestions, and feedback are all welcomed!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.