Fix [#286] - add basic_auth to request and catch failures

Align the parameters of a method call if they span more than one line.<br>Redundant curly braces around a hash parameter.<br>Use the new Ruby 1.9 hash syntax.<br>Surrounding space missing for operator '=>'.<br>Prefer single-quoted strings when you don't need string interpolation or special symbols.