-
Notifications
You must be signed in to change notification settings - Fork 19
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
Several issues with adal5-http.service #3
Comments
Fixed in d021fed, please let me now if everything works like expected. |
This works for me. I would change This will ensure that if someone set that field already it's overwritten. Otherwise you wind up with 2 Authorization headers. |
Hi @grumar , Set authorization header code throwing error if there are already headers present in the request. BR, |
Yes, the existing code has an error, this change fixes it. |
when we can expect updated version ? |
@geerzo @pandianramalingam |
@grumar yes I have and it doesn’t work if the headers is already set because the local headers variable never gets set. You if block checks if options.headers is null then sets the headers variable but if that check fails the headers variable is never set but the next line sets the Authorization header and it fails because headers is null. |
The original issue is resolved. THanks for that! For more fault tolerance, I'd check if the options parameter is actually set because otherwise the request will fail altogether. If no special http options are needed the parameter could be omitted. |
@jo-me Making observe: optional in the options object and using the HttpObserve type (like HttpClient does) should solve the problem. I did it but haven't tested it yet. May be a nice update to @grumar 's code. |
published as beta |
Hey there
I've integrated your adal wrapper and found several issues with the Adal5HTTPService.
If the method is omitted, then the request object becomes messed up. The URL is in the method field...
Not sure where the difference comes from, but I'm using Angular 5.1.
adal-angular4 does not have this issue.
Both issues can be fixed by replacing the block in sendRequest method with:
The text was updated successfully, but these errors were encountered: