angular-cn/packages/common/http/test
cexbrayat 91cdc11aa0 fix(common): allow number or boolean as http params (#40663)
This change fixes an incompatibility between the old `@angular/http` package
and its successor (`@angular/common/http`) by re-introducing the types that were supported before.

It now allows to use number and boolean directly as HTTP params, instead of having to convert it to string first.

Before:

    this.http.get('/api/config', { params: { page: `${page}` } });

After:

    this.http.get('/api/config', { params: { page }});

`HttpParams` has also been updated to have most of its methods accept number or boolean values.

Fixes #23856

BREAKING CHANGE:

The methods of the `HttpParams` class now accept `string | number | boolean`
instead of `string` for the value of a parameter.
If you extended this class in your application,
you'll have to update the signatures of your methods to reflect these changes.

PR Close #40663
2021-02-26 12:03:50 -08:00
..
BUILD.bazel test: setup circular dependency tests for all entry points (#34774) 2020-01-23 11:36:40 -08:00
client_spec.ts fix(common): allow number or boolean as http params (#40663) 2021-02-26 12:03:50 -08:00
headers_spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
jsonp_mock.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
jsonp_spec.ts fix(http): queue jsonp <script> tag onLoad event handler in microtask (#39512) 2020-11-17 13:09:08 -08:00
module_spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00
params_spec.ts fix(common): allow number or boolean as http params (#40663) 2021-02-26 12:03:50 -08:00
request_spec.ts docs: update links to use HTTPS as protocol (#39718) 2020-11-20 12:52:16 -08:00
response_spec.ts test(http): use HttpStatusCode enum in tests (#23548) 2021-01-28 09:10:48 -08:00
xhr_mock.ts fix(http): emit error on XMLHttpRequest abort event (#40767) 2021-02-10 11:13:05 -08:00
xhr_spec.ts fix(http): emit error on XMLHttpRequest abort event (#40767) 2021-02-10 11:13:05 -08:00
xsrf_spec.ts build: update license headers to reference Google LLC (#37205) 2020-05-26 14:26:58 -04:00