diff options
| author | Shulhan <ms@kilabit.info> | 2024-03-15 15:19:01 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2024-03-15 15:19:01 +0700 |
| commit | c358921275fb6c847ed6f9a266712fb1b3488c07 (patch) | |
| tree | 0d0595eb9e34a74fbb51a29aba631a9ed38a698a /http_server_test.go | |
| parent | 8ba25dd9f5d823a4bd66967b33ee9d2624397129 (diff) | |
| download | gorankusu-c358921275fb6c847ed6f9a266712fb1b3488c07.tar.xz | |
all: update module pakakeh.go to the tip
On the "lib/http" we refactoring RequestMethod and RequestType type
from int to string for readability, when the value is encoded, for
example to JSON.
So instead of 0, 1 or 2; it will print "GET", "CONNECT", or "HEAD".
Diffstat (limited to 'http_server_test.go')
| -rw-r--r-- | http_server_test.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/http_server_test.go b/http_server_test.go index d8199fd..8b009b6 100644 --- a/http_server_test.go +++ b/http_server_test.go @@ -48,7 +48,7 @@ func TestGorankusuAPITargetRunHTTP_formInputFile(t *testing.T) { for _, c = range listCase { var reqparams = httpRequestParams{ - method: apiTargetRunHTTP.Method.String(), + method: string(apiTargetRunHTTP.Method), path: apiTargetRunHTTP.Path, body: tdata.Input[c.tag+`:http_request_body`], } @@ -87,7 +87,7 @@ func TestGorankusuAPITargetRunHTTP_withRawBody_JSON(t *testing.T) { ) for _, c = range listCase { var reqparams = httpRequestParams{ - method: apiTargetRunHTTP.Method.String(), + method: string(apiTargetRunHTTP.Method), path: apiTargetRunHTTP.Path, body: tdata.Input[c.tag+`:http_request_body`], } @@ -133,7 +133,7 @@ func TestGorankusuAPITargetRunHTTP_withTargetHeaders(t *testing.T) { ) for _, c = range listCase { var reqparams = httpRequestParams{ - method: apiTargetRunHTTP.Method.String(), + method: string(apiTargetRunHTTP.Method), path: apiTargetRunHTTP.Path, body: tdata.Input[c.tag+`:request_body`], } |
