Skip to content

Commit 2cc72ba

Browse files
authored
feat(request): Improve hono request output (npm#58)
* feat(request): pretty output Signed-off-by: ysknsid25 <kengo071225@gmail.com> * feat(request): pretty output fix test Signed-off-by: ysknsid25 <kengo071225@gmail.com> * feat(request): pretty output fix function name `parsedResponseBody` Signed-off-by: ysknsid25 <kengo071225@gmail.com> * feat(request): pretty output fix README Signed-off-by: ysknsid25 <kengo071225@gmail.com> * feat(request): pretty output fix output format when direct`exclude` Signed-off-by: ysknsid25 <kengo071225@gmail.com> * feat(request): `-o <path>` and `-O` option Signed-off-by: ysknsid25 <kengo071225@gmail.com> * format Signed-off-by: ysknsid25 <kengo071225@gmail.com> * feat(request): `-J` and `--json` option Signed-off-by: ysknsid25 <kengo071225@gmail.com> * feat(request): `-i` and `-I` option Signed-off-by: ysknsid25 <kengo071225@gmail.com> * feat(request): update README.md Signed-off-by: ysknsid25 <kengo071225@gmail.com> * feat(request): refactor function getOutputData Signed-off-by: ysknsid25 <kengo071225@gmail.com> * feat(request): Pretty output resolve [object Object] when console.log to terminal Signed-off-by: ysknsid25 <kengo071225@gmail.com> * feat(request): Pretty output fix return to continue Signed-off-by: ysknsid25 <kengo071225@gmail.com> * feat(request): `-J` and `--json` option To be able to handle `application/json; charset=utf-8` Signed-off-by: ysknsid25 <kengo071225@gmail.com> * feat(request): Pretty output show more rich http header Signed-off-by: ysknsid25 <kengo071225@gmail.com> * feat(request): `-J` and `--json` option fix `formatResponseBody()` return type. string to string | object Signed-off-by: ysknsid25 <kengo071225@gmail.com> * feat(request): `-o <path>` and `-O` option To be able to save when request to / Signed-off-by: ysknsid25 <kengo071225@gmail.com> * chore: format Signed-off-by: ysknsid25 <kengo071225@gmail.com> * feat(request): `-J` and `--json` option fix indexOf to regular expressions Signed-off-by: ysknsid25 <kengo071225@gmail.com> * feat(request): `-o <path>` and `-O` option For some contentTypes, set the extension Signed-off-by: ysknsid25 <kengo071225@gmail.com> * feat(request): `-o <path>` and `-O` option For some contentTypes, set the extension by using `hono/utils/mime` Signed-off-by: ysknsid25 <kengo071225@gmail.com> --------- Signed-off-by: ysknsid25 <kengo071225@gmail.com>
1 parent 5b53d9b commit 2cc72ba

5 files changed

Lines changed: 854 additions & 15 deletions

File tree

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,11 @@ hono request [file] [options]
157157
- `-d, --data <data>` - Request body data
158158
- `-H, --header <header>` - Custom headers (can be used multiple times)
159159
- `-w, --watch` - Watch for changes and resend request
160+
- `-J, --json` - Output response as JSON
161+
- `-o, --output <file>` - Write to file instead of stdout
162+
- `-O, --remote-name` - Write output to file named as remote file
163+
- `-i, --include` - Include protocol and headers in the output
164+
- `-I, --head` - Show only protocol and headers in the output
160165
- `-e, --external <package>` - Mark package as external (can be used multiple times)
161166

162167
**Examples:**

0 commit comments

Comments
 (0)