aboutsummaryrefslogtreecommitdiff
path: root/example.go
diff options
context:
space:
mode:
Diffstat (limited to 'example.go')
-rw-r--r--example.go14
1 files changed, 1 insertions, 13 deletions
diff --git a/example.go b/example.go
index c17aab9..00ec3a9 100644
--- a/example.go
+++ b/example.go
@@ -554,19 +554,7 @@ func (ex *Example) pathExampleRawbodyJSON(epr *libhttp.EndpointRequest) (resbody
}
func (ex *Example) pathExampleUpload(epr *libhttp.EndpointRequest) (resb []byte, err error) {
- var logp = `pathExampleUpload`
-
- var res = libhttp.EndpointResponse{}
-
- res.Code = http.StatusOK
- res.Data = epr.HTTPRequest.MultipartForm.Value
-
- resb, err = json.MarshalIndent(res, ``, ` `)
- if err != nil {
- return nil, fmt.Errorf(`%s: %w`, logp, err)
- }
-
- return resb, nil
+ return epr.RequestBody, nil
}
func (ex *Example) handleWSExampleGet(_ context.Context, req *websocket.Request) (res websocket.Response) {