spacewander commented on code in PR #107:
URL: 
https://github.com/apache/apisix-go-plugin-runner/pull/107#discussion_r979818776


##########
pkg/http/http.go:
##########
@@ -95,6 +95,20 @@ type Response interface {
        // It allows you to add or set response headers before reaching the 
client.
        Header() Header
 
+       // Var returns the value of a Nginx variable, like 
`r.Var("request_time")`
+       //
+       // To fetch the value, the runner will look up the request's cache 
first. If not found,
+       // the runner will ask it from the APISIX. If the RPC call is failed, 
an error in
+       // pkg/common.ErrConnClosed type is returned.
+       Var(name string) ([]byte, error)
+
+       // Read returns HTTP response body
+       //
+       // To fetch the value, the runner will look up the request's cache 
first. If not found,
+       // the runner will ask it from the APISIX. If the RPC call is failed, 
an error in
+       // pkg/common.ErrConnClosed type is returned.
+       Read() ([]byte, error)

Review Comment:
   Better to use ReadBody?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to