diff options
| author | Shulhan <ms@kilabit.info> | 2024-02-16 00:40:17 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2024-02-16 01:38:51 +0700 |
| commit | a79914376206191870fbd19992de32dd60daad0b (patch) | |
| tree | 5ca7ed2db54bb799da2d119a29f6989f706ab887 /example.go | |
| parent | 2deaf8c4cc0f941e9c0f2c9fc079d86c1d6a8d61 (diff) | |
| download | gorankusu-a79914376206191870fbd19992de32dd60daad0b.tar.xz | |
all: change the signature of default request/response dumper
Instead of function that use the signature of HTTPRequestDumper/
HTTPResponseDumper; change it to function that _return_ HTTPRequestDumper/
HTTPResponseDumper.
In this way, the documentation can show the clear relation between
function and its type.
Diffstat (limited to 'example.go')
| -rw-r--r-- | example.go | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -699,10 +699,10 @@ func (ex *Example) runWebSocketGet(rr *RunRequest) (res interface{}, err error) func requestDumperWithoutDate(req *http.Request) ([]byte, error) { req.Header.Del(libhttp.HeaderDate) - return DumpHTTPRequest(req) + return DefaultRequestDumper()(req) } func responseDumperWithoutDate(resp *http.Response) ([]byte, error) { resp.Header.Del(libhttp.HeaderDate) - return DumpHTTPResponse(resp) + return DefaultResponseDumper()(resp) } |
