Skip to main content
Question

Rest sender multipart/form data

  • October 14, 2021
  • 6 replies
  • 407 views

Forum|alt.badge.img+6

Calling all IFS REST gurus…

Has anyone successfully sent multipart/form-data requests to REST endpoints using IFS standard functionality or do you need to go down the UTL_HTTP route to do this?  I seem to get parsing errors whenever i try to send the message using plsql_rest_sender_api.call_rest_endpoint2.

This topic has been closed for replies.

6 replies

Shehan Chandrasekara
Sidekick (Former Employee)
Forum|alt.badge.img+8

Hi @chriselliston,

 

I have done same program using UTL_HTTP. I believe that UTL_HTTP package is the most suitable one for this operation.

 

Best Regards

Shehan


Forum|alt.badge.img+6
  • Author
  • Sidekick (Partner)
  • 16 replies
  • October 14, 2021

Hi Shehan

Have you been able to pass a blob as an attachment in the multipart form-data request?

Regards

Chris


Shehan Chandrasekara
Sidekick (Former Employee)
Forum|alt.badge.img+8

Hi @chriselliston,

 

I have sent a json as a blob. However if you need to send a attachment I believe that you should chunk it before send to the endpoint.

 

Best Regards

Sheha


Forum|alt.badge.img+6
  • Author
  • Sidekick (Partner)
  • 16 replies
  • October 15, 2021

Hi Shehan

Have you got any examples?

I’ve got a simple text file working.

The blob is proving problematic though.  I’m converting to a base64 encoded clob and the file gets sent but is corrupt at the other end.

Regards

Chris


Forum|alt.badge.img+2

Hi @chriselliston ,

​Were you able to send the BLOB attachment to the REST endpoint?
We are also facing similar requirement. Kindly let us know if you have found any way to do this.

Thank You.
Regards,
Lijin


Forum|alt.badge.img+6
  • Author
  • Sidekick (Partner)
  • 16 replies
  • May 12, 2022

Hi Lijin

We got it working in the end using utl_http.write_raw but it was messy and took a lot of trial and error testing.  Getting the boundaries working properly is one of the most challenging bits of the process.

Regards

Chris


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings