This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
When you use the Download tool with an API, and you use the PUT Http verb, you often have to supply the number of bytes of any sent message in the Content-Length header.
If I formulate a JSON data packet, I have to convert to Blob to use with PUT. I need to add the number of bytes for the blob to the Content-Length header.
A browse tool reports the blob length when the blob field is displayed. How can I get that reported size, so that I can insert the number of bytes in the Content-Length header? (Note: You cannot just multiply the number of chars by 2, as UTF-8 encoding uses different numbers of bytes for different character sets [https://stackoverflow.com/questions/9761805/calc-utf-8-string-size-in-bytes]).