Answer the question
In order to leave comments, you need to log in
What is the difference between the two requests?
Why does the first request return 200,
fetch("https://api.peopledatalabs.com/v5/autocomplete?api_key=someAPIKey&field=location")
fetch(`https://api.peopledatalabs.com/v5/autocomplete`, {
"api_key": "someAPIKey",
"field": "location"
});
Answer the question
In order to leave comments, you need to log in
Because the second request does not send api_key and field to the server.
What is the difference between the two requests?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question