Hi,
This looks like a super interesting tool.
Before I dig deeply into it however, I was wondering if it supports HTTP_PUT and HTTP_DELETE? I see that it does support the others _GET and _POST.
Also, I take it that we can post to secure https sites?
Thanks!
Gary
This is great
Thanks Micah,
I managed to do everything in cURL. This is a fantastic tool and I will definitely be buying multiple licenses. I just have to show the full working solution to my boss first!
There is only one thing left for me. I want to http_POST an image ( a jpg) to a URL. I want to store this image in a container field first and then post it.
Do you have any experience on how one would do that using curl and SmartPill?
All the best,
Gary
I want to http_POST an image ( a jpg) to a URL
Hello Gary,
SmartPill doesn't allow you to read container files directly so the solution is to first export the file to disk using a script (the temp folder is a good place) and then you know the file path (look at the FM constants in the manual, in particular FM_TEMPORARY_PATH as an easy way to determine the temp folder from within your PHP code). You can then use curl to post the file.
Regards,
Micah
HTTP_PUT and Delete
Yep, just select the function and you'll see the "Code" tab. You can make changes to the code, then click the "Build & Load" button at the top of the screen to reload. You can then test your code using the "Test" tab.
Regards,
Micah
HTTP_PUT and Delete
Thanks Micah.
Do we have access to the source for the HTTP package in FunctionMaker?
Thanks,
Gary
HTTP_PUT and Delete
Hello Gary,
You're probably referring to the HTTP package in the FunctionMaker file. These functions use curl which does indeed support put and delete but you'd have to write the code. Probably the easiest way would be to extend the HTTP package with a couple of new functions: HTTP_Put and HTTP_Delete. You can find out more about setting curl options for put and delete here:
http://www.php.net/manual/en/function.curl-setopt.php
Regards,
Micah