8000 Removed overhead of function call. · phpish/http@d63ce3e · GitHub
[go: up one dir, main page]

Skip to content

Commit d63ce3e

Browse files
committed
Removed overhead of function call.
1 parent 8b27c2d commit d63ce3e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

http_api.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ function _http_client_setopts($ch, $method, $payload, $request_headers_assoc, $c
8181
$default_curl_opts[CURLOPT_CUSTOMREQUEST] = $method;
8282

8383
// This disables cURL's default 100-continue expectation
84-
if ('POST' == $method) array_push($request_headers, 'Expect:');
84+
if ('POST' == $method) $request_headers[] = 'Expect:';
8585

8686
if (is_array($payload))
8787
{
@@ -97,7 +97,7 @@ function _http_client_setopts($ch, $method, $payload, $request_headers_assoc, $c
9797
else
9898
{
9999
$payload = stripslashes(json_encode($payload));
100-
array_push($request_headers, 'Content-Type: application/json; charset=utf-8');
100+
$request_headers[] = 'Content-Type: application/json; charset=utf-8';
101101
}
102102
}
103103

0 commit comments

Comments
 (0)
0