angular4-httpclient

Default and specific request timeout

百般思念 提交于 2019-11-26 17:37:24
Usually it's desirable to have default timeout (e.g. 30s) that will be applied to all requests and can be overridden for particular longer requests (e.g. 600s). There's no good way to specify default timeout in Http service, to my knowledge. What is the way to approach this in HttpClient service? How to define a default timeout for all outgoing requests, that can be overriden for specific ones? Estus Flask It appears that without extending HttpClientModule classes, the only expected ways for interceptors to communicate with respective requests are params and headers objects. Since timeout

Default and specific request timeout

一笑奈何 提交于 2019-11-26 04:21:56
问题 Usually it\'s desirable to have default timeout (e.g. 30s) that will be applied to all requests and can be overridden for particular longer requests (e.g. 600s). There\'s no good way to specify default timeout in Http service, to my knowledge. What is the way to approach this in HttpClient service? How to define a default timeout for all outgoing requests, that can be overriden for specific ones? 回答1: It appears that without extending HttpClientModule classes, the only expected ways for