Character set error when trying to import from web API: ContentType is invalid

I'm getting the following error when I try to use "Import from Web API" action with the following API:

Error: The character set provided in ContentType is invalid. Cannot read content as string using an invalid character set.
'"UTF-8"' is not a supported encoding name. For information on defining a custom encoding, see the documentation for the Encoding.RegisterProvider method.
Parameter name: name
Source: action "Import from Web API", table "Imported table 1"

It seems to have something to do with how the API response wraps UTF-8 in quotation marks and EasyMorph doesn't seem to like this. Tested with Postman and it works fine.

Here is the header from the response that EasyMorph doesn't seem to like:
Content-Type: text/xml; charset="UTF-8"

I think it expects the UTF-8 to be without quotation marks.

Is there any way to get around this?

Hi @okabak

Seems that quotation marks caused error (according to RFC 2616, quotation marks are not used for charset.) .
For now, as workaround, you can use WebRequest action with enabled option “Failed if HTTP error, otherwise save response body to file” , and than process xml file via Import XML file action.

Hi @okabak,

we’ve updated EasyMorph to accept charset="UTF-8" with the quotation marks. You can get the updated version from our download page: https://easymorph.com/download.html