We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I found Request debug log not print cookie header. for example:
package main import ( "fmt" "net/url" "github.com/go-resty/resty/v2" ) func main() { client := resty.New() client.SetDebug(true) client.SetDebugBodyLimit(0) fmt.Println(">>>>>>>>>>>>>>>First Request") client.R().Get("https://www.google.com/") fmt.Println("") fmt.Println("Current jar cookies:") uri,_ := url.Parse("https://www.google.com/") fmt.Println(client.GetClient().Jar.Cookies(uri)) fmt.Println("") fmt.Println(">>>>>>>>>>>>>>>Second Request") client.R().Get("https://www.google.com/") }
output:
>>>>>>>>>>>>>>>First Request 2021/03/26 18:19:20.118074 DEBUG RESTY ============================================================================== ~~~ REQUEST ~~~ GET / HTTP/1.1 HOST : www.google.com HEADERS: User-Agent: go-resty/2.6.0 (https://github.com/go-resty/resty) BODY : ***** NO CONTENT ***** ------------------------------------------------------------------------------ ~~~ RESPONSE ~~~ STATUS : 200 OK PROTO : HTTP/2.0 RECEIVED AT : 2021-03-26T18:19:20.117916+08:00 TIME DURATION: 1.390281955s HEADERS : Alt-Svc: h3-29=":443"; ma=2592000,h3-T051=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43" Cache-Control: private, max-age=0 Content-Type: text/html; charset=ISO-8859-1 Date: Fri, 26 Mar 2021 10:19:19 GMT Expires: -1 P3p: CP="This is not a P3P policy! See g.co/p3phelp for more info." Server: gws Set-Cookie: 1P_JAR=2021-03-26-10; expires=Sun, 25-Apr-2021 10:19:19 GMT; path=/; domain=.google.com; Secure, NID=212=dg09nOkfsAUHX8cma6qdB53xERGeWqpeu4wb-nNXzD8mIz3nQhWcMSTgt41nS--yDc-6bk7GwApdZhMBfULy3QoWCHi3_4lAgucpKaeGuQc6fDD04TUmePF5q9NGWefW9zx1PwdrzCw3Qh95GumM2NLjrByo0vkPV2GFUyT9HCY; expires=Sat, 25-Sep-2021 10:19:19 GMT; path=/; domain=.google.com; HttpOnly X-Frame-Options: SAMEORIGIN X-Xss-Protection: 0 BODY : ***** RESPONSE TOO LARGE (size - 14107) ***** ============================================================================== Current jar cookies: [1P_JAR=2021-03-26-10 NID=212=dg09nOkfsAUHX8cma6qdB53xERGeWqpeu4wb-nNXzD8mIz3nQhWcMSTgt41nS--yDc-6bk7GwApdZhMBfULy3QoWCHi3_4lAgucpKaeGuQc6fDD04TUmePF5q9NGWefW9zx1PwdrzCw3Qh95GumM2NLjrByo0vkPV2GFUyT9HCY] >>>>>>>>>>>>>>>Second Request 2021/03/26 18:19:20.221778 DEBUG RESTY ============================================================================== ~~~ REQUEST ~~~ GET / HTTP/1.1 HOST : www.google.com HEADERS: User-Agent: go-resty/2.6.0 (https://github.com/go-resty/resty) BODY : ***** NO CONTENT ***** ------------------------------------------------------------------------------ ~~~ RESPONSE ~~~ STATUS : 200 OK PROTO : HTTP/2.0 RECEIVED AT : 2021-03-26T18:19:20.22169+08:00 TIME DURATION: 103.324114ms HEADERS : Alt-Svc: h3-29=":443"; ma=2592000,h3-T051=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43" Cache-Control: private, max-age=0 Content-Type: text/html; charset=ISO-8859-1 Date: Fri, 26 Mar 2021 10:19:20 GMT Expires: -1 P3p: CP="This is not a P3P policy! See g.co/p3phelp for more info." Server: gws Set-Cookie: 1P_JAR=2021-03-26-10; expires=Sun, 25-Apr-2021 10:19:20 GMT; path=/; domain=.google.com; Secure, NID=212=xQp7SUGfjH-8K61-GEMUP35uGnLY2-MvVKs0sxKXcTyVgQOBkTdTgEF-QStgkNWeSHxMUmbHMevb6kbBaC6r1sRrZcTKsaRv2dKJDJAZAhWle9KpxoVNdUzPPtuWjov_eIFM1-5l0fHRKDaY6UdJ0ustUglABO-bEz-q2u3WApw; expires=Sat, 25-Sep-2021 10:19:20 GMT; path=/; domain=.google.com; HttpOnly X-Frame-Options: SAMEORIGIN X-Xss-Protection: 0 BODY : ***** RESPONSE TOO LARGE (size - 14107) ***** ==============================================================================
The text was updated successfully, but these errors were encountered:
Is this problem solved?
Sorry, something went wrong.
fix: request debug log loss cookie header when cookiejar in use #424
c34815a
Merge pull request #727 from go-resty/gh-424
6242e6f
Successfully merging a pull request may close this issue.
I found Request debug log not print cookie header. for example:
output:
The text was updated successfully, but these errors were encountered: