fix digitalocean v2 api content-type when using json

In case of using json we need to set content-type header.

Signed-off-by: Vasiliy Tolstov <v.tolstov@selfip.ru>
add error code for failed auth

Signed-off-by: Vasiliy Tolstov <v.tolstov@selfip.ru>
Merge branch 'master' of github.com:vtolstov/packer into digitalocean
Merge branch 'master' of github.com:vtolstov/packer into digitalocean
fix using private ip address in digitalocean builder

Signed-off-by: Vasiliy Tolstov <v.tolstov@selfip.ru>
Merge pull request #1650 from vtolstov/digitalocean

fix digitalocean v2 api content-type when using json