This is the Python script I have running on Google App Engine:
import webapp2
form = """
<form action="/testform">
<input name="q">
<input type="submit">
</form>
"""
class MainPage(webapp2.RequestHandler):
def get(self):
self.response.headers.add_header("Access-Control-Allow-Origin", "*")
self.response.write(form)
class TestHandler(webapp2.RequestHandler):
def get(self):
q = self.request.get("q")
self.response.out.write(q)
print(q)
app = webapp2.WSGIApplication([
('/', MainPage),
('/testform', TestHandler)],
debug=True)
I'm running an AJAX on the console to see if I can get the two to talk to each other.
$.ajax({
type: 'GET',
url: url,
})
However, I'm getting an error:
jquery.min.js:4 GET https://localhost:8080/testform?q=somethingnew1 net::ERR_SSL_PROTOCOL_ERROR
I tried Googling it, but not sure what it means. Could anyone give some advice on what I'm doing wrong, and how I should go about fixing it?
Thanks!