Commit Graph

141 Commits (master)

Author SHA1 Message Date
Adam Tauber 711176ab44 [fix] allow empty URL scheme 7 years ago
Adam Tauber 7ddc409929 [fix] disable infinite down scroll - fixes #31 7 years ago
Adam Tauber 34e53c339b [enh] curl compatibility: add -x, --proxy flags to modify HTTP proxy - closes #73 7 years ago
Adam Tauber 4f308726ce [doc] update keybindings in help text 7 years ago
Adam Tauber 1969400729 [enh] curl compatibility: -k flag alias for --insecure 7 years ago
Salahutdinov Dmitry e6e364370d feature: result formatter extensibility with minor refactor and several testsy 7 years ago
nwidger c80a740d57 Use mime.ParseMediaType to parse Content-Type header
In addition, detection of JSON bodies has been expanded to include
both "application/json" as well as any Content-Type ending in "+json".
This should catch all JSON media types as registered in the IANA Media
Type registry located here:

http://www.iana.org/assignments/media-types/media-types.xhtml
7 years ago
Adam Tauber 15bccf5632 [enh] more flexible json content-type detection - closes #67 7 years ago
Adam Tauber f1acb28e73 [fix] correct home/end positions for long lines 7 years ago
Adam Tauber 64a6272718 [enh] support JSON request - related to #70 7 years ago
Pawel Wolowiec 600c77648a Refactor (#66)
Moved most view properties to the top, leaving Layout function much smaller + minor refactor
7 years ago
Adam Tauber f34c82a438 [enh] v0.2.0 7 years ago
Adam Tauber 0568b27d53 [fix] disable wrapping of editable views - related to #61 7 years ago
Adam Tauber 70e76c45b5 Merge pull request #62 from nwidger/master
Support PATCH requests with JSON bodies
7 years ago
nwidger 3dcd3b24d4 Set x-www-form-urlencoded content-type for non-binary data
Set the add_content_type when adding non-binary data with the "-d" and
"--data" options so that a "Content-Type:
application/x-www-form-urlencoded" header will get added to the
request.
7 years ago
nwidger dade4d5a47 Add "--data-binary" option to help text 7 years ago
nwidger 67e7f4d0d1 Support PATCH requests with JSON bodies
Chrome's 'Copy as cURL' option generates "-X PATCH -H 'Content-Type:
application/json' --data-binary '<json...>'" options to construct a
PATCH request that contains a JSON body.  This commit allows wuzz to
send such a request by making the following changes:

Modify App.ParseArgs to support the "--data-binary" option.  When this
option is specified, do not pass the body through url.QueryUnescape
and do not add automatically a "Content-Type:
application/x-www-form-urlencoded" header to the request.

Modify App.ParseArgs to remember if the request method has been
explicitly set via the "-X" or "--request" options and in such
situations to not automatically set the request method to POST when
request data is present.

Modify App.SubmitRequest to include the request body if the method is
PATCH.

Modify App.SubmitRequest to not replace newlines (\n) with
ampersands (&) in the request body unless a "Content-Type:
application/x-www-form-urlencoded" header exists.  This required
moving the creation of the headers to be before the creation of the
body and the actual request.
7 years ago
Pawel Wolowiec 668401e717 run gofmt 7 years ago
Pawel Wolowiec 643cce9fb8 Reformatted layout setup, so everything can be configured in one place 7 years ago
Pawel Wolowiec e5f61d9466 Changed g.Ascii to g.ASCII 7 years ago
Pawel Wolowiec 3700b249e0 Refactored many strings into consts
+ changed minor spell errors
7 years ago
Adam Tauber bf3c5b6bca [enh] configurable keybindings ++ help popup 7 years ago
Adam Tauber f3a169db6c [fix] save result popup width 7 years ago
Adam Tauber 62e59b7233 [fix] proper url param parsing/encoding 7 years ago
Adam Tauber d810c6a7db [fix] highlight only rendered json
File save and search is buggy if Request.RawResponseBody contains
color codes
7 years ago
Adam Tauber 909107cb7e Merge pull request #47 from nwidger/master
Use jsoncolor package to colorize JSON bodies
7 years ago
Zac Bowen 689a4c8d64 gofmt on code 7 years ago
Zac Bowen 2eeb02978a Added support for websites with invalid ssl certificates. This can be achieved by setting the insecure parameter in sample-config.toml or by using the --insecure flag on the command line. By default this parameter is set to false. 7 years ago
nwidger 7965b40e19 Merge branch 'master' of https://github.com/asciimoo/wuzz 7 years ago
Roi Martin f33d305d2b Sync with gocui's API
In gocui, *Gui.Ascii has been renamed to *Gui.ASCII to make golint
happy.
7 years ago
Adam Tauber 6326145735 [enh] use PreserveScrollPosition config value 7 years ago
Adam Tauber ecab5334c7 [doc] add -c to help text ++ formatting 7 years ago
Benaiah Mischenko 4ce9984b04 Add configuration system
The new configuration system, using TOML, loads into `app.config`
using a TOML config file. This can be specified on the command-line
with the `-c` option, or it can be at one of the following default
locations:

- Linux: $XDG_CONFIG_HOME/wuzz/config.toml (by default this is ~/.config/wuzz/config.toml)
- Other OSs: ~/.wuzz/config.toml

Currently the following keys can be set, along with their default
values:

```toml
[general]

timeout = "1m" # string parsed into time.Duration
formatJSON = true # toggles JSON formatting
preserveScrollPosition = true # currently unused
defaultURLScheme = "https" # when a URL is not provided, this is the scheme used by default
```

In addition, a [keys] section can also be set and will be successfully
parsed, but it is currently non-functional.
7 years ago
Yasuhiro Matsumoto bb21f2c221 use Ascii for CJK 7 years ago
Adam Tauber ce4d129702 [enh] add versioning (semver) 7 years ago
Adam Tauber e73584b0d8 [fix] add default content-type to POST/PUT method 7 years ago
Adam Tauber e2dfd77ccc [fix] do not duplicate content-type 7 years ago
Adam Tauber f1ff09bde0 [fix] add content-type if post data argument is specified - closes #48 7 years ago
Adam Tauber 155336a547 Merge pull request #39 from cyberj/master
Disable multiline on url and method views
7 years ago
Johan Charpentier a850b5c221 Create singlelineEditor for `url` `method` & `search` views 7 years ago
Niels Widger 92f2b2071b Use jsoncolor package to colorize JSON bodies
This PR uses the jsoncolor package to colorize JSON bodies.  It
changes the imports to use my forked version of
github.com/jroimartin/gocui which includes a small patch to support
zero-parameter CSI escape sequences.  I have submitted a PR upstream:

https://github.com/jroimartin/gocui/pull/98

Once that PR is merged the import can be switched back to
github.com/jroimartin/gocui if desired.
7 years ago
Georgi Dimitrov 347b666d17 Preserve the cursor position when applicable 7 years ago
Georgi Dimitrov 81c13c1a28 Reset cursors before each request
Fixes #41
7 years ago
Adam Tauber 26f8b9e669 Merge pull request #34 from georgijd/fix-view-scrolling
Prevent from scrolling past the end of the content
7 years ago
Georgi Dimitrov 9879c689a3 Use go one line if statement 7 years ago
Adam Tauber a843da2e58 [fix] update help text 7 years ago
Adam Tauber 44c6be25d0 Merge pull request #44 from dolmen-go/more-curl-args
More curl options
7 years ago
Adam Tauber 1074c14a43 Merge pull request #35 from georgijd/dont-wrap-headers
Disable wrapping for the headers view
7 years ago
Olivier Mengué 6642d2a860 Add support for curl option -X / --request 7 years ago
Olivier Mengué d4d8f8bff5 Accept -d instead of -D
-D is an alias for --dump-header, not --data
-d is the alias for --data
7 years ago
Johan Charpentier 9da99df879 Add method choice by arrow & Dedup code 7 years ago
Adam Tauber a0c10a5c05 Merge pull request #33 from pvmsikrsna/master
Show the function key bindings in the view title
7 years ago
pvmsikrsna 4ac044f954 Display the binding when printing request body
Displays the binding, F2, for the view response-body when the request body is printed.
7 years ago
pvmsikrsna fab3ab57ab Move the bindings for views close to the title 7 years ago
Adam Tauber 1c3110d2d4 [fix] adjust save-result-popup size on small screen 7 years ago
Georgi Dimitrov c43a066874 Disable wrapping for the headers view
Fixes #26
7 years ago
Georgi Dimitrov c3669ec546 Add a missing assignment operator 7 years ago
Adam Tauber 0d7f23dcf6 Merge pull request #25 from Benaiah/save-response
[mod] add dialog to save response
7 years ago
Georgi Dimitrov 05bb54a51b Prevent from scrolling past the end of the content
Fixes issue #31
7 years ago
Benaiah Mischenko 8285961cac [mod] add save result dialog 7 years ago
Benaiah Mischenko 9c167d007b [mod] change saved response permissions to 0644 7 years ago
Vamshi 05bee3e67b Show the function key binding in the view title 7 years ago
Georgi Dimitrov 93f2941a93 Print errors when parsing invalid headers 7 years ago
Benaiah Mischenko 9ff39949f7 [mod] add dialog to save response
You can now hit `<ctrl+s>` to save the response to a file.
7 years ago
Adam Tauber 392aee7191 [fix] visible cursor after error window destroy 7 years ago
Adam Tauber b2c642c5c7 [enh] show hexdump of binary responses 7 years ago
Adam Tauber 4344c6060f [fix] display error on too small terminals - closes #3 7 years ago
Adam Tauber 08e35ae9de [enh] add --compressed command line flag - closes #19 7 years ago
Johan Charpentier 18c7d220b7 Add F2..F9 Shortcuts 7 years ago
Johan Charpentier 12d00162b4 Deduplicate code 7 years ago
Johan Charpentier 217687dd79 Add Keybinding/view to choose Method 7 years ago
Adam Tauber 72b8391cef Merge pull request #14 from mattn/proxy
proxy friendly
7 years ago
Yasuhiro Matsumoto 7e44654733 disable CtrlH on Windows since it break backspace key 7 years ago
Yasuhiro Matsumoto e03a22fb71 proxy friendly 7 years ago
Adam Tauber 89bebba7a4 [enh] add alt+h to show history - closes #6 7 years ago
Adam Tauber ebb516af74 [enh] add scheme to command line url if missing - closes #8 7 years ago
Adam Tauber 36e5a32e78 [fix] exit if terminal is too small - closes #5 7 years ago
Benaiah Mischenko 23dab26160 [mod] pretty-print json responses 7 years ago
Adam Tauber 1d44b468d2 [mod] window order 7 years ago
Adam Tauber 5cf4ff18ad [enh] select previous view on shift+tab - closes #1 7 years ago
Adam Tauber ea985cc5e7 [enh] more verbose history 7 years ago
Adam Tauber 60a2bc7311 [enh] help formatting 7 years ago
Adam Tauber 1cac368155 [mod] layout change 7 years ago
Adam Tauber 25177935ac [enh] add request history 7 years ago
Adam Tauber a7d97a4ef3 [enh] uncompress gzipped response 7 years ago
Adam Tauber 2cb523c726 [enh] add timeout command line argument 7 years ago
Adam Tauber aad564918a [enh] send request if enter pressed in the url view 7 years ago
Adam Tauber 7b6d5eeaea [enh] UI non-blocking request ++ reduce default timeout 7 years ago
Adam Tauber 6b37e98403 [fix] remove http compression by default 7 years ago
Adam Tauber 623c0e1531 [mod] show search results number in title 7 years ago
Adam Tauber b85ea2b2a1 [enh] initial commit 7 years ago