actionHttpRedirect

actionHttpRedirect ( closure action ) : void

Run an action if there is an HTTP redirection. You can use MegaImporter.log and MegaImporter.error in this function. You must set exactly 4 arguments to your closure, the first will be the url of redirection. The second is the url before the redirection. The third is the HTTP code of the redirection page. The last one is the context ("post", "postBody", "postBinary", "postFile", "getPage", "setCookie", "setCookieBody", "setCookieFile").

Example


actionHttpRedirect({urlRedirection,urlOrigin,httpCode,context->
....
})

Parameters

action

The closure to run if there is an error in an HTTP request