Dear Wiki user, You have subscribed to a wiki page or wiki category on "Jakarta-httpclient Wiki" for change notification.
The following page has been changed by RolandWeber: http://wiki.apache.org/jakarta-httpclient/GuidedTourOfHttpCore The comment on the change is: added Q&A about read-only params, and params code snippets ------------------------------------------------------------------------------ the old value with the modified copy. '''Q:''' + If parameters are read-only for the framework, why is the interface read-write? + [[BR]] + '''A:''' + Good question! That's for the users, + so they can get and modify parameters without typecasting: + {{{ + request.getParams().setParameter("name", value); + }}} + + '''Q:''' What's with these {{{HttpProtocolParams}}} and {{{HttpConnectionParams}}}? Are these special implementations of the interface? [[BR]] @@ -471, +481 @@ Ah, no. We define constants for the various parameters we are using. Those classes contain the constants, and static helper methods for getting and setting the respective parameters. - This encapsulates typecasts and provides at least some type safety. + This encapsulates typecasts and provides at least some type safety: + {{{ + HttpProtocolParams.setVersion(request.getParams(), HttpVersion.HTTP_1_0); + HttpVersion version = HttpProtocolParams.getVersion(request.getParams()); + }}} '''Q:''' Is there a helper that loads parameters from a properties file? --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
