RequestT - request message type@InternalApi(value="For use by transport-specific implementations") public class RequestUrlParamsEncoder<RequestT> extends Object implements RequestParamsEncoder<RequestT>
| Constructor and Description |
|---|
RequestUrlParamsEncoder(RequestParamsExtractor<RequestT> paramsExtractor,
boolean validateExtractedParameters)
Creates the encoder.
|
| Modifier and Type | Method and Description |
|---|---|
String |
encode(RequestT request)
Encodes the
request in a form of a URL parameters string, for example "param1=value+1¶m2=value2%26". |
public RequestUrlParamsEncoder(RequestParamsExtractor<RequestT> paramsExtractor, boolean validateExtractedParameters)
paramsExtractor - parameters extractor which returns already URL-encoded key-value pairsvalidateExtractedParameters - true if this class should validate that the
extracted parameters are URL-encoded, false otherwisepublic String encode(RequestT request)
request in a form of a URL parameters string, for example "param1=value+1¶m2=value2%26". This method may optionally validate that the name-value
paris are URL-encoded, but it will not perform the actual encoding of them (it will only
concatenate the valid individual name-value pairs in a valid URL parameters string). This is
so, because in most practical cases the name-value paris are already URL-encoded.encode in interface RequestParamsEncoder<RequestT>request - request messageIllegalArgumentException - if is not