Google engine: 405 method not allowed

What are the causes of the error? NetworkError: 405 Method Not Allowed

I used a web service and suddenly it started returning this error. it is not supported, so it will not be fixed. I'm curious if I can do something about this.

Web Service Intruder URL: http://jsonpdb.appspot.com/add

+5
source share
3 answers

The method (GET / POST / HEAD, etc.) that you are trying to use at this URL is not supported by the application. Are you sure the API expects you to use the method that you use at this URL?

+8
source

"get" vs "post" . , .

class MainHander(webapp.RequestHandler):
    def get(self):
        ...
    def post(self):
        ....
    def delete(self):
        ....

, URL-, get/post/delete

def main():
    application = webapp.WSGIApplication(
        [   (r'/upload/([^/]+)?/?', UploadFileHandler),

() ... URL-: /upload/filename

class UploadFileHandler(webapp.RequestHandler):
    def post(self, filename):
        ...

.

+6

, , . , AJAX, OPTIONS, WebApp2:

class MyHandler(webapp2.RequestHandler):
    def __init__(self, request, response):
        self.initialize(request, response)

    #The dispatch is overwritten so we can respond to OPTIONS
    def dispatch(self):
        self.response.headers.add_header("Access-Control-Allow-Origin", "*")
        if self.request.method.upper() == 'OPTIONS':
            self.response.status = 204
            self.response.write('')
        else:
            super(MyHandler, self).dispatch();
+2
source

All Articles