Linx Main Linx Help

CallRESTWebService with multi-part encoded body

Hi,

I need to invoke a REST service via POST method using a multi-part encoded body. I don’t understand how to insert a file content into the body request using the correct Content-type (should be “application/pdf”) and filename.

Thank you in advance for your support.
Ivan

Hi,

This will all depend on the Service you want to call.

One thing I’ve seen now is that reading a PDF file, you’ll need to read it as Binary and probably convert to Base64. PDF files are not straight text.

Could you share the Service requirement?

Dawie

Hi Dawie, thank you for your super-fast reply! :astonished:

Here’s what I’m looking for:

Thank you,
ivan

Hi Ivan,

I’ve been trying to set the content type to PDF, but it keeps defaulting to Text, so I’ll load a bug ticket for this.

Regards,
Dawie

1 Like

Hi Dawie,

I guess it will be useful to have access to parameters/expression editor/etc. features also for “MIME type” column into the “Configure Multi-part encoded body” form, of CallRESTWebService component.

Thank you again for your quick reply, appreciated.

Regards,
Ivan

Thanks. Have loaded the support ticket. Will let you know when it’s been sorted.
Regards,
Dawie

Hi,

I’m gonna move this

I guess it will be useful to have access to parameters/expression editor/etc. features also for “MIME type” column into the “Configure Multi-part encoded body” form, of CallRESTWebService component.

into Feature’s topics.

Regards,
Ivan

Hi Dawie,

I’ve just updated the Web plug-in and now it works properly.
Thank you very much!

i.

Hi,

That’s good to hear. They released the code today, and it’s good to hear that it went through the updates so quickly.

Best regards,
Dawie

1 Like