On Tuesday, 15 March 2016 09:15:50 UTC+5:30, Sander Elias wrote: > > Hi Biswaijt, > > This is impossible to answer without knowing what your server expects. > > Regards > Sander >
Hello Sander, Thanks for replay I am using login module form here https://github.com/cornflourblue/angular-authentication-example My server expects 1. it have to be post method 2. it has 3 headers authentications : headers: { access_token : 'fcxjmozj75', client_id : '123_APP', client_secret : 'u06zzl2dxilxx' }, 3. and username password My last modified code is below $http.post('https://www.test.com/user/Api/Securelogin', { username: username, password: password }, {headers: { access_token : 'sdfsdf9clyzstmozj75', client_id : 'abc_123_APP', client_secret : 'sdfsdf78tf6j1l2dxilxx' } }) .success(function (response) { callback(response); }); here i should have a "contentType" dont know how to use. thats why i was using "transformRequest" in console i am getting *Headers* Accept application/json, text/plain, */* Accept-Encoding gzip, deflate, br Accept-Language en-US,en;q=0.5 Authorization Basic *here should have code but missing* Content-Length 36 Content-Type application/json;charset=utf-8 Cookie PHPSESSID=9f4976e98764d11a29d38065f3c29e8c Host www.test.com Referer https://www.test.com/newclip/index.html User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:44.0) Gecko/20100101 Firefox/44.0 access_token sdfsdfy4b9clyzstmsdf5 client_id sdff_123_APP client_secret sdfdsf8tf6j1l2dsdfxx *in Post* JSON password "3214" username "don" Source {"username":"don","password":"3214"} *In response* {"username":["username or email cannot be blank."],"password":["password cannot be blank."]} do you have any idea ? I have tried a lot. Thanks -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
