summaryrefslogtreecommitdiff
path: root/pkg/worker_handler/request.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/worker_handler/request.go')
-rw-r--r--pkg/worker_handler/request.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/pkg/worker_handler/request.go b/pkg/worker_handler/request.go
index 44c466bb..3d60897b 100644
--- a/pkg/worker_handler/request.go
+++ b/pkg/worker_handler/request.go
@@ -138,18 +138,18 @@ func (r *Request) Close(log logger.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() (payload.Payload, error) {
+func (r *Request) Payload() (*payload.Payload, error) {
const op = errors.Op("marshal_payload")
- p := payload.Payload{}
+ p := &payload.Payload{}
var err error
if p.Context, err = json.Marshal(r); err != nil {
- return payload.Payload{}, errors.E(op, errors.Encode, err)
+ return nil, errors.E(op, errors.Encode, err)
}
if r.Parsed {
if p.Body, err = json.Marshal(r.body); err != nil {
- return payload.Payload{}, errors.E(op, errors.Encode, err)
+ return nil, errors.E(op, errors.Encode, err)
}
} else if r.body != nil {
p.Body = r.body.([]byte)