Google Apps Script make HTTP POST

i managed to do it, here's the code:

var url = "https://api.twilio.com/2010-04-01/Accounts/ ...account.SID... /SMS/Messages.json";
var options = {
    "method": "post",
    "headers": {
        "Authorization": "Basic " + Utilities.base64Encode(" ...account.SID... : ...auth.token... ")
    },
    "payload": {
        "From": "+12025551212",
        "To": "+14155551212",
        "Body": "Test from Google Apps Script"
    }
};
var response = UrlFetchApp.fetch(url, options);

Take a look at the UrlFetchApp class. Also you probably need to pass some sort of authentication parameters to the API.