Next: , Previous: , Up: URL remapping   [Contents]

9.2 URL handling

According to RFC2616, there are GET, POST, PUT, PATCH and DELETE methods. You may register handler for specified URL rule to these methods.

There would be a HEAD method, but in GNU Artanis, the HEAD method is handled by the server, so users can not use it.

The usage:

(method rule handler)

And the handler could be one of two types, depending on your needs:

(lambda ()

(lambda (rc)

ret also has two types:

(get "/hello" (lambda () "hello world"))

For POST method:

(post "/auth" (lambda (rc) ...))