@classmethod<EOL><INDENT>def redirect(cls, request, response):<DEDENT>
if cls.meta.legacy_redirect:<EOL><INDENT>if request.method in ('<STR_LIT:GET>', '<STR_LIT>',):<EOL><INDENT>response.status = http.client.MOVED_PERMANENTLY<EOL><DEDENT>else:<EOL><INDENT>response.status = http.client.TEMPORARY_REDIRECT<EOL><DEDENT><DEDENT>else:<EOL><INDENT>response.status = http.client.PERMANENT_REDIRECT<EOL><DEDENT>response.close()<EOL>
Redirect to the canonical URI for this resource.