diff options
-rw-r--r-- | .github/ISSUE_TEMPLATE | 17 | ||||
-rw-r--r-- | php_http_client/client.php | 19 |
2 files changed, 26 insertions, 10 deletions
diff --git a/.github/ISSUE_TEMPLATE b/.github/ISSUE_TEMPLATE new file mode 100644 index 0000000..706f443 --- /dev/null +++ b/.github/ISSUE_TEMPLATE @@ -0,0 +1,17 @@ +#### Issue Summary + +A summary of the issue and the environment in which it occurs. If suitable, include the steps required to reproduce the bug. Please feel free to include screenshots, screencasts, code examples. + + +#### Steps to Reproduce + +1. This is the first step +2. This is the second step +3. Further steps, etc. + +Any other information you want to share that is relevant to the issue being reported. Especially, why do you consider this to be a bug? What do you expect to happen instead? + +#### Technical details: + +* python-http-client Version: master (latest commit: [commit number]) +* Python Version: 2.7 diff --git a/php_http_client/client.php b/php_http_client/client.php index a70e084..34775c9 100644 --- a/php_http_client/client.php +++ b/php_http_client/client.php @@ -1,7 +1,7 @@ <?php class Client { - function __construct($host, $request_headers= [], $version=null){ + function __construct($host, $request_headers = [], $version = null){ /* @param host: Base URL for the api. (e.g. https://api.sendgrid.com) @type host: string @@ -20,20 +20,19 @@ class Client { # _count and _url_path keep track of the dynamically built url $this->_count = 0; $this->_methods = ['delete', 'get', 'patch', 'post', 'put']; - $this->_url_path = {}; - $this->_status_code = null; - $this->_response_body = null; - $this->_response_headers = null; - $this->_response = null; + + $this->_reset(); } /* Resets the URL builder, so you can make a fresh new dynamic call. */ - private function _reset(self) { - $this->_count = 0 - $this->_url_path = {} - $this->_response = None + private function _reset() { + $this->_count = 0; + $this->_url_path = []; + $this->_response = null; + $this->_response_body = null; + $this->_response_headers = null; } /** |