Skip to content

Commit 0253e0f

Browse files
authored
replace custom query encoding with built-in http_build_query2017 update
1 parent 03f3ea9 commit 0253e0f

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

restclient.php

+2-6
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/**
44
* PHP REST Client
55
* https://github.com/tcdent/php-restclient
6-
* (c) 2013-2016 Travis Dent <[email protected]>
6+
* (c) 2013-2017 Travis Dent <[email protected]>
77
*/
88

99
class RestClientException extends Exception {}
@@ -160,7 +160,7 @@ public function execute($url, $method='GET', $parameters=[], $headers=[]){
160160
// merged with parameters specified in the default options.
161161
if(is_array($parameters)){
162162
$parameters = array_merge($client->options['parameters'], $parameters);
163-
$parameters_string = $client->format_query($parameters);
163+
$parameters_string = http_build_query($parameters);
164164
}
165165
else
166166
$parameters_string = (string) $parameters;
@@ -201,10 +201,6 @@ public function execute($url, $method='GET', $parameters=[], $headers=[]){
201201
return $client;
202202
}
203203

204-
public function format_query($parameters){
205-
return http_build_query($parameters);
206-
}
207-
208204
public function parse_response($response){
209205
$headers = [];
210206
$this->response_status_lines = [];

0 commit comments

Comments
 (0)