I followed this other SO question to set parameter for the URL but it was giving error:
The method
setQueryString(String)
in the typeHttpMethodBase
is not applicable for the arguments(NameValuePair[])
and
Cannot instantiate the type
NameValuePair
.
I am not able to understand the actual problem. Could some one help me on this?
The code I have used from the above question
GetMethod method = new GetMethod("example.com/page";);
method.setQueryString(new NameValuePair[] {
new NameValuePair("key", "value")
});