Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to use cURL?
Message
From
28/08/2019 13:48:02
 
 
To
28/08/2019 10:20:01
Joe Kaufman
Bell Laboratories Inc.
Wisconsin, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01670380
Message ID:
01670389
Views:
51
Thank you for your input Joe.

>> Anyone can tell me how to use cUrl in VFP?
>
>> Right now I am using TwilioX. There is libcurl class in there, so I guess that everything should be there to let me use services provided by enterprises providing cUrl access.
>
>> I want to send emails by going through SendGrid. SendGrid will let me do it with cUrl.
>
>> Anyone here that can provide me a way to use cUrl with VFP? Either by using the class that comes with TwilioX or by another way?
>
>Denis,
>
>SendGrid does like curl, by the looks of it, though once you are authenticated it seems like you could use a straight HTTP POST (e.g. with the "MSXML2.XMLHTTP" or "MSXML2.ServerXMLHTTP" COM objects in Windows). Not sure if there is a way to use straight POSTs, but that would do away with the need for curl (wish they provided Postman examples...wait, perhaps this link is helpful: https://sendgrid.com/blog/sendgrid-v3-api-postman-2/).
>
>Anyway, for curl to work you'll need to have curl installed on Windows, I would assume. This link discusses curl on Windows:
>
>https://www.thewindowsclub.com/how-to-install-curl-on-windows-10
>
>(I had no idea Win10 was shipping with curl these days -- very nice!).
>
>Once curl exists, just assemble the command and execute it with Windows API ShellExecute(). Will that not work? For example, if I do the following in FoxPro:
>
>
>DECLARE INTEGER ShellExecute IN SHELL32.DLL INTEGER nWinHandle, STRING cOperation, STRING cFileName, STRING cParameters, STRING cDirectory, INTEGER nShowWindow
>ShellExecute(0, "open", "curl", "--help", "", 1)
>
>
>I see the help information for curl scroll by in a command window and then the command window closes.
>
>As I said, though, using straight POSTs, as outlined in the Postman samples, might work better. I have been able to perform almost any web service calls straight from FoxPro using the "MSXML2.XMLHTTP" or "MSXML2.ServerXMLHTTP" COM objects in Windows...
>
>Thanks,
>Joe Kaufman
*******************************************************
Save a tree, eat a beaver.
Denis Chassé
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform