uCosminexus Application Server, Web Service Development Guide
![[Contents]](FIGURE/CONTENT.GIF)
![[Glossary]](FIGURE/GLOSS.GIF)
![[Index]](FIGURE/INDEX.GIF)
![[Back]](FIGURE/FRONT.GIF)
queryParam(String key, String value) method
Description
This method generates a new WebResource object from this object (WebResource object). The Web resource URI that is stored in the generated object is the URI for which the query parameter specified in the parameter is added to the Web resource URI stored in this object.
Syntax
public WebResource queryParam(String key,
String value)
Parameters
- key
- This is the name of a query parameter.
- value
- This is the value of a query parameter.
Return value
The method returns the generated WebResource object.
Notes
- If null is specified in the key parameter or the value parameter, the IllegalArgumentException exception is thrown.
- Specify the correct query parameter name and value in the key and value parameter. The invalid characters are automatically URL encoded according to the standard specifications.
- The following characters are not encoded:
! $ ' ( ) * - / ; ? @ _ ~ . ,
Single-byte alphanumeric characters (0 to 9, A to Z, and a to z)
- The already URL-encoded tokens are correctly recognized and hence are not URL-encoded again.
- Spaces are encoded as +.
- The query parameter of the generated WebResource object is the one for which the query parameter specified in the parameter is added in the query parameter of this object (WebResource object).
- The entity of this object (WebResource object) is not copied to the WebResource object generated with this method.
All Rights Reserved. Copyright (C) 2013, Hitachi, Ltd.