Thursday, August 15, 2013

SetCronJob supports POST requests

UPDATED on Oct 17, 2013: If your POST data is in JSON format, SetCronJob automatically appends a header Content-Type: application/json to the POST request.

SetCronJob is a web based cronjob service, and it works with URL only. By default SetCronJob will make your script execute by sending a GET request to its URL.

After receiving many feature requests to POST support, we had considered and finally added POST requests to our cronjob service.

To send a POST request to your cron URL, just hit More options, then enter POST data with format
name1=value1&name2=value2&...


For example, to log in to SetCronJob, enter cron URL
https://www.setcronjob.com/account/login
and POST data
email=demo@setcronjob.com&password=demo

If the POST data is empty (by default), SetCronJob will obviously send GET request as usual.

You can read more about POST and GET at HTTP Methods: GET vs. POST.

No comments:

Post a Comment