Advertisement
Guest User

Untitled

a guest
Oct 4th, 2016
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. public async Task<HttpResponseMessage> Login(LoginParameters parameters, [FromUri]string returnUrl)
  2. {
  3. //same validations
  4. var response = Request.CreateResponse(HttpStatusCode.Moved);
  5.  
  6. response.Headers.Location = new Uri("Http://www.google.com");
  7.  
  8. return response;
  9. }
  10.  
  11. 'user strict'
  12. var login = function ($scope, $http) {
  13.  
  14. var parameters = {
  15. userName: userName,
  16. password: password
  17. };
  18.  
  19. var url = '/api/user/Login';
  20.  
  21. $http.post(url, parameters);
  22. .then(function(response){
  23. /*some random code that i will remove */
  24. });
  25. };
  26.  
  27. login.$inject = ['$scope', '$http'];
  28. module.exports = login;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement