First bit of a POST.

This uses curl if available, but will fallback to raw HTTP requests.