I am receiving a json stream from Google and at
Dim Bytes = GetStreamAsByteArray(HttpContext.Current.Request.InputStream)
it -- sometimes -- errors out with "Either BinaryRead, Form, Files, or InputStream was accessed before the internal storage was filled by the caller of HttpRequest.GetBufferedInputStream."
This is an MVC REST app
my objective is:
Dim Bytes = GetStreamAsByteArray(HttpContext.Current.Request.InputStream)
decodedString = utf8.GetString(Bytes)
jsonResulttodict = JsonConvert.DeserializeObject(Of Dictionary(Of String, Object))(decodedString)
I saw recommended... GetStreamAsByteArray(HttpContext.Current.Request.GetBufferedInputStream)
but not sure how to implement that.
Thanks