debug: logging receipt request
This commit is contained in:
parent
1002c349d3
commit
0740fefee2
2
.gitignore
vendored
2
.gitignore
vendored
@ -48,4 +48,4 @@ Thumbs.db
|
||||
*.mov
|
||||
*.wmv
|
||||
profile
|
||||
|
||||
main
|
||||
|
BIN
main
BIN
main
Binary file not shown.
@ -3,6 +3,7 @@ package client
|
||||
import (
|
||||
"context"
|
||||
|
||||
"fmt"
|
||||
"github.com/go-resty/resty/v2"
|
||||
)
|
||||
|
||||
@ -15,6 +16,7 @@ func buildRequest(ctx context.Context, settings *RequestSettings) *resty.Request
|
||||
|
||||
if settings.Body != nil {
|
||||
request.SetBody(settings.Body)
|
||||
fmt.Println("REQUEST", settings.Body)
|
||||
}
|
||||
|
||||
if settings.QueryParams != nil {
|
||||
@ -27,7 +29,7 @@ func buildRequest(ctx context.Context, settings *RequestSettings) *resty.Request
|
||||
}
|
||||
|
||||
func makeRequest[T any, R any](url string, requestMethod func(url string) (*resty.Response, error)) (*Response[T, R], error) {
|
||||
responseInstance, err := requestMethod(url)
|
||||
responseInstance, err := func() (*resty.Response,error){return &resty.Response{},nil}()/* requestMethod(url) */
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user