Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while retrieve the data #28

Open
BUHARIMOHAMEDISMAIL opened this issue Jun 27, 2017 · 0 comments
Open

Error while retrieve the data #28

BUHARIMOHAMEDISMAIL opened this issue Jun 27, 2017 · 0 comments

Comments

@BUHARIMOHAMEDISMAIL
Copy link

I'm using the below code to retrieve the data.I'm getting an 401 unauthorized error.

	var url = 'https://xxx.yyy.zzz-gtgl.com/obdo/newsfeedinteg';
	var auth = $base64.encode("newsfeed:newsfeed@123"), 
    headers = {"Authorization": "Basic " + auth};
	$http.get(url, {headers: headers}).success(function (resp) {
		console.log(resp);
	 }).error(function (err) {
        console.log(err);
    });

When i was checking in postman it's working fine and get the json response.
In postman I'm enter the username and password in Basic Auth field which comes under Authorization and content-type as application/json finally send the POST request.

Please assist me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant