Commit Graph

116 Commits

Author SHA1 Message Date
Adam Tauber
64a6272718 [enh] support JSON request - related to #70 2017-02-22 01:24:17 +01:00
Pawel Wolowiec
600c77648a Refactor (#66)
Moved most view properties to the top, leaving Layout function much smaller + minor refactor
2017-02-19 23:54:03 +01:00
Adam Tauber
f34c82a438 [enh] v0.2.0 2017-02-18 00:36:36 +01:00
Adam Tauber
ee71867550 [doc] config documentation update 2017-02-17 01:47:04 +01:00
Adam Tauber
0568b27d53 [fix] disable wrapping of editable views - related to #61 2017-02-17 00:29:37 +01:00
Adam Tauber
70e76c45b5 Merge pull request #62 from nwidger/master
Support PATCH requests with JSON bodies
2017-02-17 00:09:35 +01:00
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.
2017-02-16 17:17:49 -05:00
nwidger
dade4d5a47 Add "--data-binary" option to help text 2017-02-16 16:14:22 -05:00
Adam Tauber
32d706201b Merge pull request #60 from wolowiec/refactor
Reformatted layout setup, so everything can be configured in one place
2017-02-16 21:03:15 +01:00
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.
2017-02-16 13:09:55 -05:00
Pawel Wolowiec
668401e717 run gofmt 2017-02-16 09:43:44 +01:00
Pawel Wolowiec
643cce9fb8 Reformatted layout setup, so everything can be configured in one place 2017-02-16 09:34:45 +01:00
Adam Tauber
196492806d Merge pull request #59 from wolowiec/refactor
Refactored many strings into consts
2017-02-16 06:15:12 +01:00
Pawel Wolowiec
e5f61d9466 Changed g.Ascii to g.ASCII 2017-02-16 01:22:15 +01:00
Pawel Wolowiec
3700b249e0 Refactored many strings into consts
+ changed minor spell errors
2017-02-16 01:19:59 +01:00
Adam Tauber
38134db8fe Merge pull request #55 from asciimoo/configurable-keybindings
Configurable keybindings and help popup
2017-02-15 23:00:30 +01:00
Adam Tauber
bf3c5b6bca [enh] configurable keybindings ++ help popup 2017-02-15 04:27:20 +01:00
Adam Tauber
0c6ade0216 [doc] update screencast 2017-02-12 23:25:58 +01:00
Adam Tauber
f3a169db6c [fix] save result popup width 2017-02-12 23:19:53 +01:00
Adam Tauber
80ea61fa3c [doc] update screencast 2017-02-12 23:02:33 +01:00
Adam Tauber
62e59b7233 [fix] proper url param parsing/encoding 2017-02-12 21:10:18 +01:00
Adam Tauber
d810c6a7db [fix] highlight only rendered json
File save and search is buggy if Request.RawResponseBody contains
color codes
2017-02-12 20:20:39 +01:00
Adam Tauber
909107cb7e Merge pull request #47 from nwidger/master
Use jsoncolor package to colorize JSON bodies
2017-02-12 17:59:29 +01:00
Adam Tauber
41c62a88bf Merge pull request #54 from zbb93/master
#49 - Ignore Invalid SSL Cert
2017-02-12 17:51:35 +01:00
Zac Bowen
689a4c8d64 gofmt on code 2017-02-12 10:46:08 -06:00
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. 2017-02-12 10:44:57 -06:00
nwidger
7965b40e19 Merge branch 'master' of https://github.com/asciimoo/wuzz 2017-02-12 09:34:07 -05:00
Adam Tauber
969cd0c1f8 Merge pull request #53 from jroimartin/fix-gocui-ascii
Sync with gocui's API
2017-02-12 14:39:46 +01:00
Roi Martin
f33d305d2b Sync with gocui's API
In gocui, *Gui.Ascii has been renamed to *Gui.ASCII to make golint
happy.
2017-02-12 14:17:09 +01:00
Adam Tauber
6326145735 [enh] use PreserveScrollPosition config value 2017-02-11 23:42:07 +01:00
Adam Tauber
ecab5334c7 [doc] add -c to help text ++ formatting 2017-02-11 22:04:49 +01:00
Adam Tauber
46994a8c6c Merge pull request #51 from Benaiah/config-file
Add configuration system
2017-02-11 21:57:12 +01:00
Benaiah Mischenko
3f312fbb4c Add sample config file 2017-02-11 11:55:36 -08:00
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.
2017-02-11 11:55:28 -08:00
Adam Tauber
51613246b5 Merge pull request #52 from mattn/ascii
use gocui.Ascii for CJK
2017-02-11 20:07:16 +01:00
Yasuhiro Matsumoto
bb21f2c221 use Ascii for CJK 2017-02-12 00:24:31 +09:00
Adam Tauber
ce4d129702 [enh] add versioning (semver) 2017-02-11 02:14:54 +01:00
Adam Tauber
e73584b0d8 [fix] add default content-type to POST/PUT method 2017-02-11 01:51:19 +01:00
Adam Tauber
e2dfd77ccc [fix] do not duplicate content-type 2017-02-11 01:45:09 +01:00
Adam Tauber
f1ff09bde0 [fix] add content-type if post data argument is specified - closes #48 2017-02-11 01:12:35 +01:00
Adam Tauber
155336a547 Merge pull request #39 from cyberj/master
Disable multiline on url and method views
2017-02-10 19:20:40 +01:00
Johan Charpentier
a850b5c221 Create singlelineEditor for url method & search views 2017-02-10 17:13:40 +01:00
Adam Tauber
ef78501721 [mod] travis test matrix mods 2017-02-10 14:38:06 +01:00
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.
2017-02-10 08:21:46 -05:00
Adam Tauber
672d90209d Merge pull request #45 from georgijd/reset-cursors-on-new-req
Reset cursors before each request
2017-02-10 02:25:39 +01:00
Georgi Dimitrov
347b666d17 Preserve the cursor position when applicable 2017-02-10 01:01:20 +00:00
Adam Tauber
45b5eeed4e [enh] add osx to travis tests ++ remove buggy automatic build 2017-02-10 01:36:38 +01:00
Georgi Dimitrov
81c13c1a28 Reset cursors before each request
Fixes #41
2017-02-09 23:59:14 +00:00
Adam Tauber
dfd6b36801 [enh] add travis config 2017-02-10 00:49:31 +01:00
Adam Tauber
26f8b9e669 Merge pull request #34 from georgijd/fix-view-scrolling
Prevent from scrolling past the end of the content
2017-02-09 23:23:08 +01:00