Can';我不理解带有AndroidAnnotations的POST请求的逻辑

Can';我不理解带有AndroidAnnotations的POST请求的逻辑,android,post,android-annotations,Android,Post,Android Annotations,我想使用AndroidAnnotations发送POST请求。在我的POST请求中,我需要发送两个字符串参数—Mail和Phone 我正试图用下面的代码来实现这一点。 以下是POST方法的定义: @Post("&Action=login") LoginWebInfo getLoginWebInfo (TreeMap data); 下面是我如何称呼这个方法的: TreeMap<String, String> data = new TreeMap<String, Stri

我想使用AndroidAnnotations发送POST请求。在我的POST请求中,我需要发送两个字符串参数—Mail和Phone

我正试图用下面的代码来实现这一点。 以下是POST方法的定义:

@Post("&Action=login")
LoginWebInfo getLoginWebInfo (TreeMap data);
下面是我如何称呼这个方法的:

TreeMap<String, String> data = new TreeMap<String, String>();
data.put("Mail", email);
data.put("Phone", phone);
return webInteractionWithUserClient.getRegistrationWebInfo(data);
TreeMap data=newtreemap();
数据输入(“邮件”,电子邮件);
数据输入(“电话”,电话);
返回webInteractionWithUserClient.getRegistrationWebInfo(数据);

但是这个代码似乎不起作用。我的错误在哪里?

使用多值映射,而不是树

MultiValueMap<String, String> data = new LinkedMultiValueMap<String, String>();

data.add("mail",email);
data.add("Phone", phone);

LoginWebInfo logWebInfo = webInteractionWithUserClient.getRegistrationWebInfo(data);
MultiValueMap data=newlinkedMultivaluemap();
数据。添加(“邮件”,电子邮件);
数据。添加(“电话”,电话);
LoginWebInfo logWebInfo=webInteractionWithUserClient.getRegistrationWebInfo(数据);