Use reason method for httpclient

Fix "undefined method" exception.