2
After executing this one, I came across this error, which did not display the API information. Whereas in another URL of a similar API the code displayed and worked perfectly.
API URL: https://economia.awesomeapi.com.br/json/all
$.ajax({
type: "POST",
dataType: "JSON",
url: "https://economia.awesomeapi.com.br/json/all",
success: function(data){
console.log(data["USD"]["code"]);
}
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
What’s the mistake? And transfer the code, [Edit] the question and don’t show an image, this makes it difficult to help your problem.
– UzumakiArtanis
Test with GET instead of POST
– Caique Romero
It worked, thank you Caique Romero!
– IamJG