fix(http): don't encode values that are allowed in query (#9651)
This implements a new class, QueryEncoder, that provides methods for encoding keys and values of query parameter. The encoder encodes with encodeURIComponent, and then decodes a whitelist of allowed characters back to their unencoded form. BREAKING CHANGE: The changes to Http's URLSearchParams serialization now prevent encoding of these characters inside query parameters which were previously converted to percent-encoded values: @ : $ , ; + ; ? / The default encoding behavior can be overridden by extending QueryEncoder, as documented in the URLSearchParams service. Fixes #9348
This commit is contained in:
@ -34,7 +34,8 @@ export {Http, Jsonp} from './src/http';
|
||||
export {Connection, ConnectionBackend, RequestOptionsArgs, ResponseOptionsArgs, XSRFStrategy} from './src/interfaces';
|
||||
export {Request} from './src/static_request';
|
||||
export {Response} from './src/static_response';
|
||||
export {URLSearchParams} from './src/url_search_params';
|
||||
export {QueryEncoder, URLSearchParams} from './src/url_search_params';
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user