wuzz icon indicating copy to clipboard operation
wuzz copied to clipboard

Wuzz can't handle responses other than JSON?

Open tobiasboyd opened this issue 8 years ago • 4 comments

Trying it against an API that returns XML, no results are displayed, only the headers. It seems like at a minimum it would be friendly to show an error/warning that wuzz can't parse the body of the response... and maybe indicate in the readme what it can handle?

tobiasboyd avatar Feb 06 '17 17:02 tobiasboyd

@tobiasboyd, empty response body is strange.. wuzz should display all text based responses - it works for me with XML. Could you provide an URL where I can reproduce the error?

asciimoo avatar Feb 06 '17 20:02 asciimoo

Wuzz dies when accessing brotli encoded data i.e.

wuzz http://httpbin.org/brotli

Gives me the following error

panic: json formatter error

goroutine 1 [running]:
log.Panicln(0xc42004de80, 0x1, 0x1)
	/usr/local/go/src/log/log.go:336 +0xc0
main.main()
	/Users/karlbateman/go/src/github.com/asciimoo/wuzz/wuzz.go:1743 +0xb35

mindvox avatar Mar 24 '17 15:03 mindvox

@karlbateman, the standard http lib in go can't decode brotli compressed responses. I added a more graceful error handling in 07ede4e .

asciimoo avatar Mar 24 '17 22:03 asciimoo

@asciimoo Handling that gracefully is great 👍

mindvox avatar Mar 25 '17 12:03 mindvox