You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Content = new StringContent(JsonConvert.SerializeObject(response), Encoding.Default, "application/json")
then the charset ends up as Windows-1252, not UTF-8, because Encoding.Default turns out to be Windows-1252 in this situation.
httprepl can't handle this charset, so instead of the body from the server, I get an error from httprepl itself -- in this case I'm getting an error back from the server, and the body is encoded this way:
System.InvalidOperationException: The character set provided in ContentType is invalid. Cannot read content as string using an invalid character set. ---> System.ArgumentException: 'Windows-1252' is not a supported encoding name. For information on defining a custom encoding, see the documentation for the Encoding.RegisterProvider method.
In this case, I control the API as well so I can change the encoding there, but it would be nice if httprepl could manage this charset itself.
The text was updated successfully, but these errors were encountered:
If the API I'm talking to has code like
then the charset ends up as Windows-1252, not UTF-8, because Encoding.Default turns out to be Windows-1252 in this situation.
httprepl can't handle this charset, so instead of the body from the server, I get an error from httprepl itself -- in this case I'm getting an error back from the server, and the body is encoded this way:
The headers returned are:
and then the error from httprepl itself is:
In this case, I control the API as well so I can change the encoding there, but it would be nice if httprepl could manage this charset itself.
The text was updated successfully, but these errors were encountered: