Answer the question
In order to leave comments, you need to log in
How to fix error: Unexpected identifier - in json POST request?
There is a NodeJS program that should send POST requests to a specific url and at the same time contain json data, the program works, but when I put a dash in the json data (for example: mobile-links-tel), the program gives an error: Unexpected identifier - and swears on a dash (using the request library)
Answer the question
In order to leave comments, you need to log in
You need to bind the context.
constructor(props, context) {
super(props, context);
this.onRegionChange = this.onRegionChange .bind(this);
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question