Error making javascript request

Asked

Viewed 204 times

0

I’m trying to make a request in this format

 $.get("http://meuurl.com/webservice", function (data) {
        console.log(data);
    }).fail(function (data) {
        console.log(data);
    });

But I get this mistake

Failed to load Resource: the server responded with a status of 500 (Internal Server Error)

  • $.get utilize dataType and follow https://api.jquery.com/jquery.get/ .. if you can try $.ajax also

1 answer

1

Your request is successfully exiting the browser. However, some server-side error is occurring. Normally, the 500 error is a simple NullPointerException.

If you cannot identify the error on the server, you can edit your question by adding the server-side code and the error log. So we can help you more effectively.

Any doubt I’m available.

  • Where I can view the log in the visual studio, I tried to enable Messageloggin and Tracing on the Web.Config but nothing appears in Output Debug

  • Natanel, what language are you using? Could you edit the question and put more about your code?

Browser other questions tagged

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