summaryrefslogtreecommitdiff
path: root/plugins/http/request.go
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2020-12-17 02:34:44 +0300
committerValery Piashchynski <[email protected]>2020-12-17 02:34:44 +0300
commit9d5fe4f6a98b30fd73be8259f84fa595ac994a71 (patch)
treee49c46b03d8facc73e96f1b6247d83367cc65398 /plugins/http/request.go
parent1033c25b6bfc752d6059e446510f651e22cbf49b (diff)
huge refactor
Diffstat (limited to 'plugins/http/request.go')
-rw-r--r--plugins/http/request.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/http/request.go b/plugins/http/request.go
index 640bdec2..5df79b7d 100644
--- a/plugins/http/request.go
+++ b/plugins/http/request.go
@@ -9,8 +9,8 @@ import (
"strings"
j "github.com/json-iterator/go"
- "github.com/spiral/roadrunner/v2"
"github.com/spiral/roadrunner/v2/interfaces/log"
+ "github.com/spiral/roadrunner/v2/internal"
"github.com/spiral/roadrunner/v2/plugins/http/attributes"
)
@@ -136,17 +136,17 @@ func (r *Request) Close(log log.Logger) {
// Payload request marshaled RoadRunner payload based on PSR7 data. values encode method is JSON. Make sure to open
// files prior to calling this method.
-func (r *Request) Payload() (roadrunner.Payload, error) {
- p := roadrunner.Payload{}
+func (r *Request) Payload() (internal.Payload, error) {
+ p := internal.Payload{}
var err error
if p.Context, err = json.Marshal(r); err != nil {
- return roadrunner.EmptyPayload, err
+ return internal.Payload{}, err
}
if r.Parsed {
if p.Body, err = json.Marshal(r.body); err != nil {
- return roadrunner.EmptyPayload, err
+ return internal.Payload{}, err
}
} else if r.body != nil {
p.Body = r.body.([]byte)