System.ArgumentException: Offset and length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection.
at FSharp.Data.HttpHelpers.augmentWebExceptionsWithDetails@1207-2.Invoke(Exception _arg1)
at Microsoft.FSharp.Control.AsyncBuilderImpl.callA@839.Invoke(AsyncParams`1 args)
usage
let body = req.Body |> Json.formatWith JsonFormattingOptions.Compact |> HttpRequestBody.TextRequest
let res = Http.RequestString(url=req.Url, httpMethod = "POST", body = body)
no specific pattern observed. replaced with .net core http library
let body = lpreq.Body |> Json.formatWith JsonFormattingOptions.Compact
let req = HttpWebRequest.Create(lpreq.Url) :?> HttpWebRequest
req.ProtocolVersion <- HttpVersion.Version10
req.Method <- "POST"
let postBytes = Encoding.ASCII.GetBytes(body)
req.ContentType <- "application/json"
req.ContentLength <- int64 postBytes.Length
let reqStream = req.GetRequestStream()
reqStream.Write(postBytes, 0, postBytes.Length);
reqStream.Close()
let resp = req.GetResponse()
let stream = resp.GetResponseStream()
let reader = new StreamReader(stream)
let res = reader.ReadToEnd()
everything is fine. looks like some internal bug!?
some requests fails with
usage
no specific pattern observed. replaced with .net core http library
everything is fine. looks like some internal bug!?