post to cgi, JSON in Headers?

Dave Kilroy dave at applicationinsight.com
Thu Feb 1 10:28:15 EST 2018


Klaus I wonder if he wants you to let the server know what kind of data
you'll be sending up, it's not uncommon to set the headers this way when
posting data to an API:

put "Content-Type: application/json" into tHeaders
set httpHeaders to tHeaders


Good luck!

Dave 



Nicolas Cueto via use-livecode wrote
> As a file, or to a SQL database? I successfully store PDFs in a mySQL
> database as large blobs. For PDFs that are not large, a medium BLOB would
> probably be fine. I open the PDF for binary read, then read until EOF. But
> my PDFs are one or at most two page fillable forms. 
> 
> Bob S
> 
> 
>> On Jan 31, 2018, at 08:25 , Klaus major-k via use-livecode <

> use-livecode at .runrev

> > wrote:
>> 
>> Hi friends,
>> 
>> I am scripting a routine to upload a PDF file to a server.
>> So far, so good-> libURLMultipartFormData() is my friend.
>> 
>> but now the developer of the API send me two TOKENs for authentification
>> and said: 
>> "...and make sure you're posting the HTTP header data (the tokens) as
>> application/json."
>> ???
>> Now he is not available for the next hours. :-(
>> 
>> Anyone knows what he is talking about and how I can add this to my
>> scripts?
>> Thanks a lot in advance!
>> 
>> 
>> Best
>> 
>> Klaus
>> --
>> Klaus Major
> 
> 
> _______________________________________________
> use-livecode mailing list

> use-livecode at .runrev

> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





-----
"The first 90% of the task takes 90% of the time, and the last 10% takes the other 90% of the time."
Peter M. Brigham 
--
Sent from: http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html




More information about the Use-livecode mailing list