title: Cannot transcode invalid UTF-8 JSON text to UTF-16 string
body: <p>Given the function:</p>
  
  <pre><code>   let postData url (payload:JObject) =
          Http.RequestString
              (url,
              headers = [HttpRequestHeaders.ContentType HttpContentTypes.Json],
              body = HttpRequestBody.TextRequest (payload |&gt; string))
  </code></pre>
  
  <p>I am unable to send the data to the backend as it fails with the error: </p>
  
  <pre><code>AutoMapper.AutoMapperMappingException: Error mapping types.
  
  
   ---&gt; System.InvalidOperationException: Cannot transcode invalid UTF-8 JSON text to UTF-16 string.
   ---&gt; System.Text.DecoderFallbackException: Unable to translate bytes [E9] at index 629 from specified code page to Unicode.
     at System.Text.DecoderExceptionFallbackBuffer.Throw(Byte[] bytesUnknown, Int32 index)
     at System.Text.DecoderExceptionFallbackBuffer.Fallback(Byte[] bytesUnknown, Int32 index)
     at System.Text.Encoding.GetCharCountWithFallback(ReadOnlySpan`1 bytes, Int32 originalBytesLength, DecoderNLS decoder)
     at System.Text.Encoding.GetCharCountWithFallback(Byte* pBytesOriginal, Int32 originalByteCount, Int32 bytesConsumedSoFar)
     at System.Text.UTF8Encoding.GetCharCount(Byte* bytes, Int32 count)
     at System.String.CreateStringFromEncoding(Byte* bytes, Int32 byteLength, Encoding encoding)
     at System.Text.Encoding.GetString(ReadOnlySpan`1 bytes)
     at System.Text.Json.JsonReaderHelper.TranscodeHelper(ReadOnlySpan`1 utf8Unescaped)
     --- End of inner exception stack trace ---
     at System.Text.Json.JsonReaderHelper.TranscodeHelper(ReadOnlySpan`1 utf8Unescaped)
     at System.Text.Json.JsonDocument.GetRawValueAsString(Int32 index)
     at System.Text.Json.JsonElement.ToString()
     at lambda_method(Closure , CreateContainerCommand , Container , ResolutionContext )
     --- End of inner exception stack trace ---
     at lambda_method(Closure , CreateContainerCommand , Container , ResolutionContext )
     at lambda_method(Closure , Object , Object , ResolutionContext )
  </code></pre>
  
  <p><strong>BUT</strong> the same request with the same <em>body</em> works just fine from Postman. What am I missing? </p>
  
  <p>btw. printfn of <code>payload |&gt; string</code> also prints the object just fine</p>