You tried to visit the /post via the browser? Obviously, It would not work. 
Browser always send request using GET method when you type the url.
You should know the difference between GET, POST, PUT etc methods of the 
HTTP requests to understand this problem.

On Friday, March 21, 2014 5:55:21 AM UTC+8, ling.f%[email protected] 
wrote:
>
> I'm new to webpy and python, I just want to try the basic "hello world" 
> locallly.
>
> GET works OK, but POST returns 405 Method Not Allowed.
>
> Here is my code:
>
> import web
>
> urls = (
>     "/get", "get",
>     "/post", "post"
> )
> app = web.application(urls, globals())
>
> class get:
>     def GET(self):
>         return "get"
>
> class post:
>     def POST(self):
>         return "post"
>
> if __name__ == "__main__":
>     app.run()
>
>
> Anyone will give a hand? Thanks!
>

-- 
You received this message because you are subscribed to the Google Groups 
"web.py" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/webpy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to