Skip to content

Parse multi-part response #107

@NiharikaPatel

Description

@NiharikaPatel

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

-----------------------------211044896921589655921082427940
Content-Disposition: form-data; name="file"; filename="hw.txt"
Content-Type: text/plain

Hello World

-----------------------------211044896921589655921082427940
Content-Disposition: form-data; name="document"; filename="blob"
Content-Type: application/json

[object Object],[object Object],[object Object],[object Object]
-----------------------------211044896921589655921082427940--

How do i extract just the "Hello World" part without
-----------------------------211044896921589655921082427940
Content-Disposition: form-data; name="file"; filename="hw.txt"
Content-Type: text/plain

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions