2

Is it possible to pass a user and password to basic auth in AngularJS? I am using a $http to make the request :

  var urlsave = myurl;    
  $http({method: 'GET', url: urlsave}).success(function(data) {
      console.log(data);
  })

This is the response :

Status Code:401 Unauthorized

I don't have access to the back end but there is no CORS, i just need to pass it my username and password

1 Answer 1

1

Yes you can pass username and password if you know username and password.

for example : http://username:[email protected]/api/something

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.