ngx-typeahead
ngx-typeahead copied to clipboard
Set Headers key and value
Hi, is there anyway that i could set a key and a value when sending http
for example i would like to send a token to my backend
Authorization: Bearer myToken
Package
"@angular/common": "^4.2.4",
"ngx-typeahead": "^0.1.0"
update package versions
+1 And dunno why my httpclient interceptor is bypassed by you component. Using angular 4.4.6 and ngx-typeahead 0.4
@alecrt can you share an example?
how do you set the header so you can pass Auth Tokens?
example: headers: new HttpHeaders() .set('Authorization',token)
and BTW, your 'Using STATIC list' example code is not working, it does not filter the results based on the query value.
@LREEVES353 , you're right about the filter - i'll try to update soon. currently, you cannot pass auth-tokens. as mentioned, try using interceptor for this one.
Hi, Any update about the issue with HTTP_INTERCEPTORS ? Still interceptors getting bypassed
Same for me. Need to pass auth header and other header. What about passing an observable and the subscribe to it when needed?
HTTP interceptor is bypassed by ngx-typeahead. angular 6.
Hi Team! I Need to add headers on httpClient API request, Any update on this?
same here, interceptor is bypassed. Useless without withCredentials request property (Laravel Sanctum). Reactive forms works fine with this module, unlike ngb-typehead. shame