Can anyone explain to me how to get a username and password from a request header in ruby?
CodePudding user response:
maybe this one request.headers
E.g
request.headers['username']
CodePudding user response:
Simplest way to do so is to access request.headers
request.headers[:password]
# or
request.headers['password']
If you're unsure about the headers you're sending/receiving you can always do
raise request.headers.inspect