Not setting apiBase in the interceptor?
See original GitHub issueI’m submitting a…
- Regression (a behavior that used to work and stopped working in a new release)
- Bug report
- Performance issue
- Feature request
- Documentation issue or request
- Other… Please describe:
Current behavior
With the apiBase set, it’s not prepending it to the path in HTTP calls. E.g. if I call this.http.get('foo').subscribe(...)
I see a call to http://localhost:4200/foo
. If specify the full path, e.g. this.http.get('http://myurl.com/foo')
it works fine.
Expected behavior
The value of apiBase is prepended to the path in the interceptor.
What is the motivation / use case for changing the behavior?
This is how this used to work in the previous versions. If something changed in how this is expected to work, none of the docs have been updated.
Environment
Angular-Token version: 6.0.2 Angular version: 6.1.1
Bundler
- Angular CLI (Webpack)
- Webpack
- SystemJS
Browser:
- Chrome (desktop) version 68.0.3440.106
- Chrome (Android) version XX
- Chrome (iOS) version XX
- Firefox version XX
- Safari (desktop) version XX
- Safari (iOS) version XX
- IE version XX
- Edge version XX
Others:
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
How do I set the baseUrl for Angular HttpClient?
Use the new HttpClient Interceptor. Create a proper injectable that implements HttpInterceptor : import {Injectable} from '@angular/core'; import {HttpEvent ...
Read more >Angular: Consuming multiple APIS with Angular HTTPClient in ...
1- First, you need to create a Interceptor using HttpInterceptor: ... APIs in a easy way, but if we need to set headers,...
Read more >Retrofit 2 — How to Change API Base Url at Runtime
ServiceGenerator.changeApiBaseUrl("http://development.futurest..."); This changeApiBaseUrl() not working.In my project baseUrl working always.
Read more >Customizing Axios Packages and Configuring Interceptors ...
This tutorial introduces the reader to the concepts of Axios interceptors in Vue.js.
Read more >z/OS Connect (OpenAPI 2) change history - IBM
PH50643 - The values set for attributes connectionTimeout and ... The omegamonRequestMonitor-2.0 interceptor is not compatible with this level of z/OS ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@misham The
apiBase
is indeed for the auth paths, but also as a security measure. The token headers are only added to calls going to theapiBase
server.One other update,
sign in
&sign out
plus all the “built-in” functions around auth work just fine. Only the interceptor is not working for some reason.