base64_encode
brefphp/bref
Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Encodes data with MIME base64
base64_encode
(
string $string
):
string
'isBase64Encoded'
=>
$base64Encoding
,
'statusCode'
=>
$this
->
statusCode
,
$headersKey
=>
$headers
,
'body'
=>
$base64Encoding
?
base64_encode
(
$this
->
body
) :
$this
->
body
,
];
}
src/Event/Http/HttpResponse.php
'isBase64Encoded'
=>
$base64Encoding
,
'statusCode'
=>
$this
->
statusCode
,
'headers'
=>
$headers
,
'body'
=>
$base64Encoding
?
base64_encode
(
$this
->
body
) :
$this
->
body
,
];
}
src/Event/Http/HttpResponse.php
'Content-Type'
=>
'application/x-www-form-urlencoded'
,
'Content-Length'
=>
mb_strlen
(
'foo=bar'
),
],
'body'
=>
base64_encode
(
'foo=bar'
),
];
$this
->
assertGlobalVariables
(
$event
, [
'$_GET'
=> [],
tests/Handler/FpmHandlerTest.php
'status'
=> (string)
$response
->
getStatusCode
(),
'reason'
=>
$response
->
getReasonPhrase
(),
'headers'
=>
$headers
,
'body'
=>
base64_encode
((string)
$response
->
getBody
()),
];
}
self
::
getClient
()->
request
(
'PUT'
,
'guzzle-server/responses'
, [
tests/Server.php