mirror of
https://github.com/eolinker/apinto
synced 2025-10-05 08:47:04 +08:00
Fix: AI provider call failure error not returning
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"bytes"
|
||||
"net/http"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/valyala/fasthttp"
|
||||
@@ -20,7 +21,7 @@ type requestAgent struct {
|
||||
statusCode int
|
||||
status string
|
||||
responseLength int
|
||||
responseBody string
|
||||
responseBody strings.Builder
|
||||
beginTime time.Time
|
||||
endTime time.Time
|
||||
hostAgent *UrlAgent
|
||||
@@ -31,7 +32,7 @@ type requestAgent struct {
|
||||
}
|
||||
|
||||
func (a *requestAgent) ResponseBody() string {
|
||||
return a.responseBody
|
||||
return a.responseBody.String()
|
||||
}
|
||||
|
||||
func (a *requestAgent) ResponseHeaders() http.Header {
|
||||
|
Reference in New Issue
Block a user