Redirect response to location

Use by default 303 See Other as it is the RFC way to redirect web applications to a new URI.

Property definitions

popcorn :: pop_handlers $ HttpResponse :: redirect
	# Redirect response to `location`
	#
	# Use by default 303 See Other as it is the RFC
	# way to redirect web applications to a new URI.
	fun redirect(location: String, status: nullable Int) do
		header["Location"] = location
		if status != null then
			status_code = status
		else
			status_code = 303
		end
		check_sent
		sent = true
	end
lib/popcorn/pop_handlers.nit:461,2--474,4