airborne icon indicating copy to clipboard operation
airborne copied to clipboard

Can't login with post '/user/login/', { :email => 'username', :password => 'password' }

Open dmotrenko opened this issue 10 years ago • 6 comments

I am trying to login I tried post '/user/login', { :email => 'username', :password => 'password' } Tried post '/user/login', { :email => 'username', :password => 'password' } , { 'Content-Type' => 'application/x-www-form-urlencoded' } and get an error message

I can login with postman using the same credentials I can login with frisby.js frisby.create('login') .post(BASE_URL + 'user/login', { email: email, password: password } ) .expectStatus(200) .expectJSON({ status: 0 })

dmotrenko avatar Aug 13 '15 07:08 dmotrenko

Is Airborne working for you at all? Are you using rails?

sethpollack avatar Aug 13 '15 11:08 sethpollack

Yes, airborne is working for get requests. And I don't use rails.

dmotrenko avatar Aug 13 '15 19:08 dmotrenko

I tried reproducing this with no luck. Can you post the error message you're getting?

brooklynDev avatar Aug 13 '15 21:08 brooklynDev

describe 'catalog paid videos' do it 'should validate types' do post '/user/login', { :email => 'email', :password => 'passwrod' }, { 'Content-Type' => 'application/x-www-form-urlencoded' } puts response end end

this is the response {"status":61,"error":[{"description_ru":"поле пустое"},{" description_en":"Field empty"}]} This is custome error message means that I am not logged in.

This is the code I use in frisby.js frisby.create('login') .post(BASE_URL + 'user/login', {email: email, password: password} ) .expectStatus(200) .expectJSON({ status: 0 }) And this works all the time. I get status: 0 as expected and user is logged in.

Also this works for me too resp_login = RestClient.post (BASE_URL + '/user/login/?ctt=json'), :email => USER['email'], :password => USER['password']

And this works too. curl -d "[email protected]" -d "password=asdasd" http://api.tvzavr.ru/api/3.0/user/login

dmotrenko avatar Aug 14 '15 06:08 dmotrenko

Is the endpoint right? Or missing base URL

aditya-freshdesk avatar Dec 20 '16 06:12 aditya-freshdesk

Hello. Code Triage volunteer here. I've just started using airborne and am really enjoying it.

As this issue has been open for several years, and could not be replicated, I would like to propose that it be closed @dmotrenko @brooklynDev

docljn avatar May 12 '21 16:05 docljn