I am trying to pass a HashMap parameter to the function I am using in Fitnesse. However, nothing is being passed correctly, as i am getting "{}" when remote debugging in eclipse.
Below is the method that I am calling:
public String issueHttpRequest(String url, Map<String,String> params){
client = new HttpClient();
PostMethod post = createPostMethod(url);
for (Map.Entry<String, String> entry : params.entrySet()){
post.addParameter(entry.getKey(), entry.getValue());
}
client.executeMethod(post);
String response = post.getResponseBodyAsString();
return response;
}
Here is how I am calling it from FitNesse:
!|script|CLASS_NAME|
|check|issueHttpRequest;|login|!{username:"guest",password:"guest"}|{"status":"success"}|
When remote debugging in eclipse, params is being passed as empty brackets {}.
Any help would be appreciated. Thanks in advance.