mirror of
https://github.com/WJQSERVER-STUDIO/ghproxy.git
synced 2026-02-03 08:11:11 +08:00
use touka uni httpc
This commit is contained in:
parent
781e175721
commit
904a800eea
11 changed files with 51 additions and 128 deletions
|
|
@ -119,6 +119,7 @@ func GhcrRequest(ctx context.Context, c *touka.Context, u string, image *imageIn
|
|||
}()
|
||||
|
||||
method = c.Request.Method
|
||||
ghcrclient := c.GetHTTPC()
|
||||
|
||||
rb := ghcrclient.NewRequestBuilder(method, u)
|
||||
rb.NoDefaultHeaders()
|
||||
|
|
@ -267,6 +268,7 @@ func ChallengeReq(target string, image *imageInfo, ctx context.Context, c *touka
|
|||
var resp401 *http.Response
|
||||
var req401 *http.Request
|
||||
var err error
|
||||
ghcrclient := c.GetHTTPC()
|
||||
|
||||
rb401 := ghcrclient.NewRequestBuilder("GET", "https://"+target+"/v2/")
|
||||
rb401.NoDefaultHeaders()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue