Skip to Main Content

ORDS, SODA & JSON in the Database

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Restful webhook with content type multipart/form-data; boundary=

Frank LehmannOct 25 2024 — edited Oct 25 2024

Hi helpers,

i am using apex 24.2 with restfull service.

I have created a post module to receive data in the body from another site.

This post has an header with a content type “multipart/form-data; boundary=------------------------1gve1GeFqCQMVHw4mzVGi7”.
This indicates, that a file is attached. But in the post there isn't a file attached.
When the body of this post is filled, the output of the post modul is empty.
Here is a test case.
Create a simple POST PL/SQL modul.
Create a table to receive clob and blob data (create table tmp(blob_data blob, clob_data clob)
Save this modul.

declare
ls_body blob := :body;
ls_clob clob := :body_json;
begin
insert into tmp(blob_data,clob_data) values(ls_body,ls_clob);
:status_code := 200;
end;

After that using a simple curl statement to test functionality.

curl -X POST -d "Test Body" https://<your created webhook link>
You will see, the insert has inserted the value as expected.

curl -X POST -d "Test Body" https://<your created webhook link> -H "Content-Type: multipart/form-data; boundary=------------------------1gve1GeFqCQMVHw4mzVGi7"
in this case, an empty body is stored to the table.

Any ideas ?
It is a bug ?

Comments
Post Details
Added on Oct 25 2024
9 comments
747 views