#PUT request to Azure Files with shared key authorization

1 messages · Page 1 of 1 (latest)

ionic fjord
#

https://www.programiz.com/online-compiler/3tHcWltzZMIIt

Here is the code I wrote. I'm having trouble with the POST request. Could you please tell me what the issue might be?

403
<?xml version="1.0" encoding="utf-8"?><Error><Code>AuthenticationFailed</Code><Message>Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.
ionic fjord
#

Is there a process or prapatti missing in signature creation?

ionic fjord
#

What data do you need in the request header and what values do you pass to canonicalizedHeaders?

ionic fjord
#

Changed code.

400
<?xml version="1.0" encoding="utf-8"?><Error><Code>InvalidHeaderValue</Code><Message>The value for one of the HTTP headers is not in the correct format.
RequestId:f8b6aba2-801a-0051-017f-0587ab000000
Time:2024-09-13T01:52:38.5640529Z</Message><HeaderName>Content-Length</HeaderName><HeaderValue>11</HeaderValue></Error>