ich muss über ein REST API eine Datei an einen Server sende. Mit Curl schaut es aus:
Code: Alles auswählen
curl -v -X POST -H"Content-Type: application/pdf" --data-binary @localfilesystem/6047170.pdf -i -u user@server:password "https://server/formidable/appserver/api/v1/documents/43/attachments/myAttachment.pdf"
Code: Alles auswählen
oHttp := TServerXMLHTTPRequest():New()
if oHttp:Open("POST",cUrl,,"username","password")
oHTTp:lIgnoreCertAll := .t.
if oHttp:Send()
sleep(5)
cc := oHttp:responseBody
Grüße
Rudolf