Closed abhijeetahuja closed 4 years ago
Sorry to necrobump, but I am new to getsandbox and am having this issue as well. @abhijeetahuja did you come up with anything?
@tylergannon I ended up using Mockable.io for this particular use case.
Hmm not sure how i missed this, normally we try and comment / close off any issues sorry for the many month delay.
At the moment we dont' do any special processing on multipart form-data types, obviously you can cut up the body yourself via req.body.split(..) etc, but that kinda sucks. I'll put something on the backlog to process it properly. I presume the ideal behaviour would be accessing the form data via its name/key? req.body.user_id? This would work in cases where the form part is non-binary, does that suit your usecase?
Fixed
My client is sending the data in post request as
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary0rrbbU838w7gACJi
, how can I access that in my code. I've tried req.body['user_id'], but it doesn't work. I even tried to get an idea from the case study but that didn't help either. It works for content-type:application/x-www-form-urlencoded
From the sandbox console: