Skip to content

Instantly share code, notes, and snippets.

@PavloConan
Created August 21, 2018 11:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PavloConan/7801890a54af1f4de551706d2505e4a5 to your computer and use it in GitHub Desktop.
Save PavloConan/7801890a54af1f4de551706d2505e4a5 to your computer and use it in GitHub Desktop.
$.ajax({
   dataType: 'json',
   type: 'POST',
   url: Routes.call_to_api1_path(),
   success: function() {
     $.ajax({
        dataType: 'json',
        type: 'POST',
        url: Routes.call_to_api2_path(),
        success: function() {
           redirect()
        }
     })
   }
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment