I've got a POSTMAN request working fine, but it us...
# suitescript
d
I've got a POSTMAN request working fine, but it uses a POST , and 'form data' .. can't see to mimick that in SS2
b
Use https post and set the body to a javascript object
d
Nope
b
if you want multipart form data, you need to build the post body yourself
raw, it should look something like
Copy code
POST /test.html HTTP/1.1
Host: <http://example.org|example.org>
Content-Type: multipart/form-data;boundary="boundary"

--boundary
Content-Disposition: form-data; name="field1"

value1
--boundary
Content-Disposition: form-data; name="field2"; filename="example.txt"

value2
--boundary--
d
Ya, I read that. It's a very specific example and I was hoping for a more generic example. Hence, putting it to the community
s
Actually I found that to be a pretty generic working solution when I had to implement this. There's actually a large chunk of that code that you can ignore if you only have a specific use case and don't need it to be so generic. Like I only needed it to work for csv files so I didn't need the whole
types
object. That code works perfectly
Athough it's compiled so there's a couple lines that you don't use when youre putting it in your own suitescript. It explains that in the comments