eliminate error var, test for response object, try...catch exception
example using curl's proxy options