ngx-typeahead icon indicating copy to clipboard operation
ngx-typeahead copied to clipboard

Set Headers key and value

Open AzrizHaziq opened this issue 7 years ago • 9 comments

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

AzrizHaziq avatar Jan 03 '18 06:01 AzrizHaziq

+1 And dunno why my httpclient interceptor is bypassed by you component. Using angular 4.4.6 and ngx-typeahead 0.4

alecrt avatar Jan 03 '18 14:01 alecrt

@alecrt can you share an example?

orizens avatar Jan 11 '18 10:01 orizens

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 avatar Jan 25 '18 21:01 LREEVES353

@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.

orizens avatar Jan 25 '18 22:01 orizens

Hi, Any update about the issue with HTTP_INTERCEPTORS ? Still interceptors getting bypassed

waqar-baig avatar Jul 16 '18 06:07 waqar-baig

Same for me. Need to pass auth header and other header. What about passing an observable and the subscribe to it when needed?

marchrius avatar Aug 30 '18 14:08 marchrius

HTTP interceptor is bypassed by ngx-typeahead. angular 6.

nechifora avatar Feb 04 '19 20:02 nechifora

Hi Team! I Need to add headers on httpClient API request, Any update on this?

rajithsam avatar Oct 24 '19 10:10 rajithsam

same here, interceptor is bypassed. Useless without withCredentials request property (Laravel Sanctum). Reactive forms works fine with this module, unlike ngb-typehead. shame

dennmtr avatar Oct 29 '20 19:10 dennmtr