更新好 requests版本
This commit is contained in:
@@ -60,7 +60,15 @@ func TestCaseRenderMegre(t *testing.T) {
|
||||
t.Error("upload_url not exists")
|
||||
}
|
||||
|
||||
if resp.GetStatusCode() != 200 {
|
||||
t.Error("put failed")
|
||||
// 向服务器发送 GET 请求,访问图片链接
|
||||
imgResp, err := requests.Get(result.Get("data.upload_url").String()).Execute()
|
||||
if err != nil {
|
||||
t.Errorf("failed to access image URL: %v", err)
|
||||
}
|
||||
|
||||
// 检查图片响应状态码
|
||||
if imgResp.GetStatusCode() != 200 {
|
||||
t.Errorf("unexpected image response status: %d", imgResp.GetStatusCode())
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user