mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 23:10:55 +00:00
fixed bug-request dump too early
This commit is contained in:
parent
7b39bd7042
commit
f684de2385
@ -319,13 +319,6 @@ func (b *BeegoHttpRequest) getResponse() (*http.Response, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
b.req.URL = url
|
b.req.URL = url
|
||||||
if b.setting.ShowDebug {
|
|
||||||
dump, err := httputil.DumpRequest(b.req, true)
|
|
||||||
if err != nil {
|
|
||||||
println(err.Error())
|
|
||||||
}
|
|
||||||
println(string(dump))
|
|
||||||
}
|
|
||||||
|
|
||||||
trans := b.setting.Transport
|
trans := b.setting.Transport
|
||||||
|
|
||||||
@ -370,6 +363,14 @@ func (b *BeegoHttpRequest) getResponse() (*http.Response, error) {
|
|||||||
b.req.Header.Set("User-Agent", b.setting.UserAgent)
|
b.req.Header.Set("User-Agent", b.setting.UserAgent)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if b.setting.ShowDebug {
|
||||||
|
dump, err := httputil.DumpRequest(b.req, true)
|
||||||
|
if err != nil {
|
||||||
|
println(err.Error())
|
||||||
|
}
|
||||||
|
println(string(dump))
|
||||||
|
}
|
||||||
|
|
||||||
resp, err := client.Do(b.req)
|
resp, err := client.Do(b.req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
Loading…
Reference in New Issue
Block a user