Tag: main

56 votes
6 answers
729 views
How to send a correct authorization header for basic authentication

I am trying to POST data from my API but I can't pass the basic authentication. I try: $.ajax({ type: &

avatar
Kristopher
0 1 0 9
asked 07 September, 2021
64 votes
30 answers
2.3K views
How to enable CORS in ASP.net Core WebAPI

What I am trying to do I have a backend ASP.Net Core Web API hosted on an Azure Free Plan (Source Code: https

avatar
Corey
0 1 0 9
asked 07 September, 2021
68 votes
30 answers
1.2K views
What does if __name__ == "__main__": do?

Given the following code, what does the if __name__ == "__main__": do? # Threading example import time, threa

avatar
Trudy
0 1 0 9
asked 07 September, 2021
62 votes
18 answers
1.2K views
Origin is not allowed by Access-Control-Allow-Origin

I'm making an Ajax.request to a remote PHP server in a Sencha Touch 2 application (wrapped in PhoneGap).

avatar
Patsy
0 1 0 9
asked 07 September, 2021
57 votes
14 answers
2.3K views
jQuery AJAX cross domain

Here are two pages, test.php and testserver.php. test.php <script src="scripts/jq.js" type="text/javascri

avatar
Hildegard
0 1 0 9
asked 07 September, 2021
59 votes
17 answers
727 views
How do I send a cross-domain POST request via JavaScript?

How do I send a cross-domain POST request via JavaScript? Notes - it shouldn't refresh the page, and I n

avatar
Margo
0 1 0 9
asked 07 September, 2021
53 votes
30 answers
1.9K views
What does "Could not find or load main class" mean?

A common problem that new Java developers experience is that their programs fail to run with the error message

avatar
Xavier
0 1 0 9
asked 07 September, 2021
55 votes
30 answers
1.9K views
How can I fix &apos;android.os.NetworkOnMainThreadException&apos;?

I got an error while running my Android project for RssReader. Code: URL url = new URL(urlToRssFeed); SAXPa

avatar
Rudy
0 1 0 9
asked 07 September, 2021