You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am sending a json and a binary or text file and I need to Parse the response.body to just get the contents of it. Right now the request body looks like this
How do i extract just the "Hello World" part without
-----------------------------211044896921589655921082427940
Content-Disposition: form-data; name="file"; filename="hw.txt"
Content-Type: text/plain
Great! thank you, however, the "-----------------------------211044896921589655921082427940" changes every time. Is there a generalized way of finding the separator before feeding it in the FormScanner ?
Activity
wookay commentedon Sep 15, 2020
related https://github.com/wookay/Bukdu.jl/blob/master/src/plugs/ContentParsers.jl
NiharikaPatel commentedon Sep 16, 2020
Great! thank you, however, the
"-----------------------------211044896921589655921082427940"changes every time. Is there a generalized way of finding the separator before feeding it in the FormScanner ?wookay commentedon Sep 16, 2020
see https://www.w3.org/Protocols/rfc1341/7_2_Multipart.html
NiharikaPatel commentedon Sep 16, 2020
Thanks! The json part is still as [object, Object]
NiharikaPatel commentedon Sep 16, 2020
Figured it out, I was sending the json as an object instead of a string from the front end. Thanks for your help!