diff options
author | Valery Piashchynski <[email protected]> | 2020-12-17 12:13:55 +0300 |
---|---|---|
committer | GitHub <[email protected]> | 2020-12-17 12:13:55 +0300 |
commit | ee0cb478c74c393a35155c2bf51e1ef260e0e5e2 (patch) | |
tree | 2c99d4c6e2b2e9e3fa155d5d68a9d471c9aeeb9b /plugins/http/request.go | |
parent | a1dc59cabb6e63eab232922f4eb5a19dbd168f44 (diff) | |
parent | edf924b37bcdad14eb31014c571ab58720aa178f (diff) |
Merge pull request #452 from spiral/refactor/splitv2.0.0-alpha23
Refactor/split
Diffstat (limited to 'plugins/http/request.go')
-rw-r--r-- | plugins/http/request.go | 10 |
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) |