I'm new to Ruby, and currently trying to create a login step however somehow even after I fill in the value, it comes back with
Request: {"headers":{},"timeout":60,"body":"{\n\t\"email\": \"johnsnow@gmail.com\",\n\"password\": \"AnotherJ0hnSnow\"\n}"}
Response code: 400
Response time: 78 ms
Response body: {"message":{"email":"cannot be blank","password":"cannot be blank"}}
{"message":{"email":"cannot be blank","password":"cannot be blank"}}
Even when I already fill it with
When client sends a POST request to "XXXX" with body:
"""
{
"email": "johnsnow",
"password": "AnotherJ0hnSnow"
}
"""
Did I miss something?
Trying to log in by using the value that I input in the body
I already tried just using the token however somehow it still got 400 with an empty field
@access_token = ENV['API_TOKEN']
puts "access_token : #{@access_token}"
@headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => "Bearer #{@access_token}"
}
I also tried searching but somehow I didn't get what I'm looking for from the thread like: Password can't be blank or "Password can't be blank" Rails Rails 4.2.4 by giving put, it shows up but still somehow it rejects in this step