Method answering requests such as foo?s=some_string&i=42&b=true

By default, the name of the HTTP resource is the name of the method. Responds to all HTTP methods, including GET, POST, PUT and DELETE.

All arguments are deserialized from a JSON format, except for strings that are used as is.

Property definitions

nitcorn $ MyAction :: foo
	# Method answering requests such as `foo?s=some_string&i=42&b=true`
	#
	# By default, the name of the HTTP resource is the name of the method.
	# Responds to all HTTP methods, including GET, POST, PUT and DELETE.
	#
	# All arguments are deserialized from a JSON format,
	# except for strings that are used as is.
	fun foo(s: String, i: Int, b: Bool): HttpResponse
	is restful do
		var resp = new HttpResponse(200)
		resp.body = "foo {s} {i} {b}"
		return resp
	end
lib/nitcorn/examples/src/restful_annot.nit:25,2--37,4