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

Use 2 (not 0) spaces for indentation.<br>Space inside { missing.<br>Prefer single-quoted strings when you don't need string interpolation or special symbols.