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

Line is too long. [163/120]<br>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>Space inside { missing.<br>Space inside } missing.<br>Space inside parentheses detected.<br>Prefer single-quoted strings when you don't need string interpolation or special symbols.