From a79914376206191870fbd19992de32dd60daad0b Mon Sep 17 00:00:00 2001 From: Shulhan Date: Fri, 16 Feb 2024 00:40:17 +0700 Subject: 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. --- example.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'example.go') diff --git a/example.go b/example.go index 5a34632..73c97f3 100644 --- a/example.go +++ b/example.go @@ -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) } -- cgit v1.3