BookmarkSubscribeRSS Feed
agno3
Calcite | Level 5

Hi,

 

I'm trying to post zipped  XPT files to a URL using the code below...

But the output file tells me that I am - "Missing boundary header", hence end up with a 400 Bad Request.

 

This is what I see when I create an output file to capture the response from my PROC. I know my macro variable boundary resolves because I see it from my %PUT in the code.

What am I "missing" here ? Help appreciated.

@ChrisHemedinger - any insight ? Thanks in advance.

agno3_0-1682100164741.png

 

 

 

 

 

filename XptFile "../dataraw/new_zip.zip";

/* Set the authorization header */
%let auth_header = Authorization=Bearer &ACCESS_TOKEN;

/* Set boundary */ %let boundary=%sysfunc(uuidgen());
%put &boundary.; /* Make the HTTP PUT request */ filename response temp; proc http method="POST" url="&base_uri/repository/container/&containerAID/&version/upload/Raw Data" in=XptFile out=response; headers 'Authorization'="Bearer &ACCESS_TOKEN"; headers 'Content-Type'="multipart/form-data" 'boundary' = "&boundary."; run; %put &SYS_PROCHTTP_STATUS_CODE.; %put &SYS_PROCHTTP_STATUS_PHRASE.;

 

1 REPLY 1
AllanBowe
Barite | Level 11

looks like multipart form data isn't yet supported

https://communities.sas.com/t5/SAS-Procedures/multipart-form-data-REST-API-POST-in-PROC-HTTP-failing...

 

EDIT:  catching up, indeed it is actually supported in 2025

https://documentation.sas.com/doc/en/pgmsascdc/v_063/proc/p10hyllh9kzzwxn1juthxahne5vp.htm

/Allan
MacroCore library for app developers
Data Workflows, Data Contracts, Data Lineage, Drag & drop excel EUCs to SAS 9 & Viya - Data Controller
DevOps and AppDev on SAS 9 / Viya / Base SAS - SASjs

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 1167 views
  • 1 like
  • 2 in conversation