How do I accept request with ISO-8859-1 charset?

Asked

Viewed 33 times

0

I have in my system a POST route for my clients to send information. Where a client is trying to send a POST request with the following header:

Content-Type: application/x-www-form-urlencoded; charset=ISO-8859-1

When the client triggers this request the following error is displayed:

UnsupportedMediaTypeError: unsupported charset "ISO-8859-1"
at urlencodedParser 

My system is written in Node.Js, as I do to accept the request. Today I’m using express:

var express = require('express');
var bodyParser = require('body-parser');

global.app = express();
app.use(bodyParser.urlencoded({ limit: '5mb', extended: true }));

app.use(bodyParser.json({ limit: '5mb', virtuals: true }));

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.