# Microsoft Azure REST API - Authorization Rejection due to 'Content-Length'

**URL:** <https://forum.inductiveautomation.com/t/microsoft-azure-rest-api-authorization-rejection-due-to-content-length/45032>\
**Category:** Ignition\
**Tags:** perspective, scripting\
**Created:** [March 29, 2021, 9:25pm UTC](https://forum.inductiveautomation.com/t/microsoft-azure-rest-api-authorization-rejection-due-to-content-length/45032 "2021-03-29T21:25:08Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [March 29, 2021, 9:28pm UTC](https://forum.inductiveautomation.com/t/microsoft-azure-rest-api-authorization-rejection-due-to-content-length/45032/2 "2021-03-29T21:28:46Z")

</div>

Have you seen this topic?

> [@system.net.httpClient().request() is doing some uncommanded encoding on my binary data](http://forum.inductiveautomation.com/t/system-net-httpclient-request-is-doing-some-uncommanded-encoding-on-my-binary-data/45003):
>
> I would like to have my Vision client user select a file, and then use system.net.httpClient() to POST the contents of that file via HTTP. According to the documentation, the following should work. h = system.net.httpClient() path = 'C:\pathtomyfile' bytes= system.file.readFileAsBytes(path).tostring() # returns a byte string of the file data print(len(bytes)) # sanity check to make sure that our byte string has been imported correctly into memory h.request("http://example.com","POST",data=byt…

---

_[View the full topic](https://forum.inductiveautomation.com/t/microsoft-azure-rest-api-authorization-rejection-due-to-content-length/45032)._
