js-data-http icon indicating copy to clipboard operation
js-data-http copied to clipboard

Overwrite config of an instance with typescript (v3)

Open zontafil opened this issue 7 years ago • 1 comments

hello, I'm trying to change the http config (specifically the headers) after the adapter is instantiated. I'm trying something like:

let adapter = new HttpAdapter({});
adapter.httpConfig = {headers: {}};
adapter.basePath = "test";

which results in "Property 'basePath' does not exist on type 'HttpAdapter'."

I can solve by setting the type of adapter to "any". Is there a better solution?

thanks

zontafil avatar Nov 10 '16 20:11 zontafil