davecheney / httpstat

It's like curl -v, with colours.
MIT License
6.96k stars 382 forks source link

Add body output options #47

Closed jrozner closed 7 years ago

jrozner commented 7 years ago

Implementation for #48

Add the -O and -o options from cURL to allow the body to be written out to a file either as a specified name or as the name of the requested URI

Note: This will probably effect timing information because if the output options are used they will take longer than the io.Discard nop. This can instead be moved into a go routine, that is waited for at end of execution, if desired to alleviate any inconsistencies but when the move to httptrace is done I'm not sure if this will be effected.

davecheney commented 7 years ago

@jrozner please follow the contribution guidelines and raise an issue before slinging code.

I have no objection to adding this flag but there is other work being done in this area, #20 and #35 for example. It may be worth waiting until those PRs have landed.

jrozner commented 7 years ago

Sorry, will put up an issue and see what the verdict is with #20 and #35.

davecheney commented 7 years ago

Hopefully #50 will have made this PR easier to integrate.

davecheney commented 7 years ago

Please rebase against master to fix the conflict.

davecheney commented 7 years ago

Thank you.