You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
private function resolveBody()
{
// If the body has already been specified, it will not be resolved.
if (isset($this->options['body'])) {
return;
}
......
}
should be :
private function resolveBody()
{
// If the body has already been specified, it will not be resolved.
if (isset($this->options['body'] )
&& Stringy::contains($this->options['headers']['Content-Type'], 'application/json')
) {
$this->options['headers']['Content-MD5'] = base64_encode(hex2bin(md5($this->options['body'], true)));
return;
}
......
}
BTW:
you are using : ===> not try yet
base64_encode(md5($this->options['body'], true));
I am using: ===> it works
base64_encode(hex2bin(md5($body)))
Line 101:
if (Stringy::contains($this->options['headers']['Content-Type'], 'application/json', false)) {
should be:
if (Stringy::contains($this->options['headers']['Content-Type'], 'application/json')) {
The text was updated successfully, but these errors were encountered:
original code: got error
invalid signature
becauseContent-MD5
never add to headers inresolveParameter
.fixed by below: add
Content-MD5
myselfwhat I found:
should be :
BTW:
you are using : ===> not try yet
I am using: ===> it works
Line 101:
should be:
The text was updated successfully, but these errors were encountered: