Skip to content

Commit 8893175

Browse files
committed
refactor: replace deprecated getHeader() with header()
1 parent 7554b2f commit 8893175

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

user_guide_src/source/libraries/curlrequest/006.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22

33
echo $response->getStatusCode();
44
echo $response->getBody();
5-
echo $response->getHeader('Content-Type');
5+
echo $response->header('Content-Type');
66
$language = $response->negotiateLanguage(['en', 'fr']);
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
22

3-
if (strpos($response->getHeader('content-type'), 'application/json') !== false) {
3+
if (strpos($response->header('content-type'), 'application/json') !== false) {
44
$body = json_decode($body);
55
}

0 commit comments

Comments
 (0)