From a8ac9d4c5903ae66f0cb1257b6f18ac27e6342f0 Mon Sep 17 00:00:00 2001 From: Mzack9999 Date: Mon, 22 Feb 2021 14:11:45 +0100 Subject: [PATCH] fixing dump request with raw bytes --- util.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/util.go b/util.go index 193b6a0..23c7cbc 100644 --- a/util.go +++ b/util.go @@ -115,6 +115,9 @@ func firstErr(err1, err2 error) error { // DumpRequestRaw to string func DumpRequestRaw(method, url, uripath string, headers map[string][]string, body io.Reader, options Options) ([]byte, error) { + if len(options.CustomRawBytes) > 0 { + return options.CustomRawBytes, nil + } if headers == nil { headers = make(map[string][]string) }