Hello all,
I'm new to apex and restful but I've been able to follow and complete some basic examples.
I would thank anyone to help me with the following:
REST Data Services Developers Guide
In the previous link the doc. tells how to use apex to create a restful service to insert a record in the following table:
CREATE SEQUENCE GALLERY_SEQ
/
CREATE TABLE GALLERY (
ID NUMBER NOT NULL ENABLE,
TITLE VARCHAR2(1000) NOT NULL ENABLE,
CONTENT_TYPE VARCHAR2(1000) NOT NULL ENABLE,
IMAGE BLOB NOT NULL ENABLE,
CONSTRAINT GALLERY_PK PRIMARY KEY (ID) ENABLE
)
/
this is the source field to create the restful service.
declare
image_id integer;
begin
insert into gallery (title,content_type,image)
values (:title,:content_type,:body)
returning id into image_id;
:status := 201;
:location := image_id;
end;
The problem I found is that I have no idea how to call the rest service given there are normal parameters and a parameter of file type to upload.
I would like to know how to call this from httpclient - firefox or similar.
Many thanks.
Juanje