From 416b0d29b959c330d00f8fcabb98276603426927 Mon Sep 17 00:00:00 2001 From: Vani Date: Sun, 3 Feb 2019 17:39:28 -0800 Subject: [PATCH] docs: add details to HttpUrlEncodingCodec API description (#28507) PR Close #28507 --- packages/common/http/src/params.ts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/packages/common/http/src/params.ts b/packages/common/http/src/params.ts index 4daba56ab5..3e037ba4a3 100755 --- a/packages/common/http/src/params.ts +++ b/packages/common/http/src/params.ts @@ -14,16 +14,19 @@ * @publicApi **/ export interface HttpParameterCodec { - encodeKey(key: string): string; - encodeValue(value: string): string; + encodeKey(key: string):string; + encodeValue(value: string):string; - decodeKey(key: string): string; - decodeValue(value: string): string; + decodeKey(key: string):string; + decodeValue(value: string):string; } /** * A `HttpParameterCodec` that uses `encodeURIComponent` and `decodeURIComponent` to - * serialize and parse URL parameter keys and values. + * serialize and parse URL parameter keys and values. If URL query parameters are + * passed without encoding, they might be misinterpreted at the receiving end. Use the + * `HttpParameterCodec` to encode the query-string values. The same class can be used to decode the + * encoded query-string values. * * @publicApi */