PeopleTools and Lifecycle Management - PSFT (MOSC)

MOSC Banner

PEOPLESOFT - REST API - POST Method ( Send file as an Attachment)

When doing a POST call, I am attaching a file and sending and its not working.

&inFile = GetFile(&strFilePath | &strFileName, "R", %FilePath_Absolute);

If &inFile.IsOpen Then
&theBase64encodedString = &inFile.GetBase64StringFromBinary();
&inFile.Close();

End-If;

&Request = CreateMessage(Operation.operation name);
&Request.URIResourceIndex = 1;

&b = &Request.IBInfo.IBConnectorInfo.AddConnectorProperties("Accept", "application/json", %HttpHeader);
&b = &Request.IBInfo.IBConnectorInfo.AddConnectorProperties("Content-Type", "application/octet-stream", %HttpHeader);
&b = &Request.IBInfo.IBConnectorInfo.AddConnectorProperties("Authentication", "Bearer " | &token, %HttpHeader);

&b = &Request.IBInfo.IBConnectorInfo.AddConnectorProperties("Content-Length", String(48), %HttpHeader);

&b = &Request.SetContentString(&theBase64encodedString);

&zxcResponse = %IntBroker.SyncRequest(&Request);

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center