Skip to content

Commit

Permalink
Migrate to HTTP2 standard (lowercase headers)
Browse files Browse the repository at this point in the history
  • Loading branch information
guyromb authored Jul 7, 2022
1 parent 3409d3f commit c9c66c0
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions bitvavo.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,11 @@ function sendPublic($url, $params, $method, $data) {
}
$sig = createSignature($now, $method, $endpointParams, [], $this->apiSecret);
$headers = array(
'Bitvavo-Access-Key: ' . $this->apiKey,
'Bitvavo-Access-Signature: ' . $sig,
'Bitvavo-Access-Timestamp: ' . (string)$now,
'Bitvavo-Access-Window: ' . (string)$this->accessWindow,
'Content-Type: application/json'
'bitvavo-access-key: ' . $this->apiKey,
'bitvavo-access-signature: ' . $sig,
'bitvavo-access-timestamp: ' . (string)$now,
'bitvavo-access-window: ' . (string)$this->accessWindow,
'content-type: application/json'
);
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
}
Expand All @@ -166,11 +166,11 @@ function sendPrivate($endpoint, $params, $body, $method, $apiSecret, $base, $api
$sig = createSignature($now, $method, $endpointParams, $body, $apiSecret);
$curl = $this->createCurl($base . $endpoint, $method, $params);
$headers = array(
'Bitvavo-Access-Key: ' . $apiKey,
'Bitvavo-Access-Signature: ' . $sig,
'Bitvavo-Access-Timestamp: ' . (string)$now,
'Bitvavo-Access-Window: ' . (string)$this->accessWindow,
'Content-Type: application/json'
'bitvavo-access-key: ' . $apiKey,
'bitvavo-access-signature: ' . $sig,
'bitvavo-access-timestamp: ' . (string)$now,
'bitvavo-access-window: ' . (string)$this->accessWindow,
'content-type: application/json'
);
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
if($method == "POST") {
Expand Down Expand Up @@ -838,4 +838,4 @@ public function subscriptionBook($market, callable $callback) {
}
}

?>
?>

1 comment on commit c9c66c0

@bvandevliet
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool! But what about #4 ?

Please sign in to comment.