Hello @SujithkumarGSuriyamurthy-7096 ,
Thanks for your query ! I just tried your previous version of the script and was able to insert the required data to the azure table storage.
I was able to repro your issue on your previous version by explicitly mentioning the "Content-Length" to some x value in the headers.
- What is the reason you want to explicitly mention the content length ?
- Did you try removing that property ?
- If the Content-Length is not hardcoded , how are you calculating the content Length dynamically?
Basically , content length implicitly also includes the type of encoding which we use . For example , if the actual data is 5 bytes - then over all content-length can be more than 5 bytes depending upon the encoding used. So while the data is being pushed using REST API when it goes through transit - it implicitly uses some sort of encoding - you might want to think over about that.
ASCIIEncoding encoding = new ASCIIEncoding ();
byte[] samplebyte= encoding.GetBytes (sampledata);
For example: For the below string , if you try to get a normal length - it will just output 1 . But if you try to get the length through some encoding in terms of bytes those will return different outputs (2 & 1)
var s = "é"
var s = "e";
Kindly let us know if you need additional help.