dpdillinger/clipchat — pull request #3 by dwwoelfel (2014-02-11 01:51:55+00:00)
Title: use https to prevent 301s from Hipchat

Hipchat recently began returning 301s when a request is made without https.

I haven't been able to find any reference to the change in Hipchat's docs, but we're consistently seeing it in production. The http responses look like:

```
{:status 301,
:trace-redirects ["http://api.hipchat.com/v1/rooms/message"],
:headers
{"server" "nginx",
"content-type" "text/html",
"date" "Tue, 11 Feb 2014 01:38:34 GMT",
"cache-control" "no-cache=\"set-cookie\"",
"location"
"https://api.hipchat.com/v1/rooms/message?format=json&auth_token=REDACTED&room_id=Development&from=Daniel¬ify=1&color=yellow&message_format=html&message=hi",
"content-length" "178",
"connection" "Close"},
:request-time 194,
:body
"\r\n

301 Moved Permanently

\r\n

\r\n

301 Moved Permanently

\r\n

nginx\r\n

\r\n\r\n"}
```