这是调用方法的代码 -
NameValuePair[] data = {
new NameValuePair("first_name", firstName),
new NameValuePair("last_name", lastName),
new NameValuePair("email", email),
new NameValuePair("company", organization),
new NameValuePair("phone", phone)
};
SalesForceFormSubmissionUtil.submitForm(data,CONTACT_FOR_TYPE);
在被调用的方法中 -
public static void submitForm(NameValuePair[] givendata, String contactType) {
HttpClient client = new HttpClient();
PostMethod post = new PostMethod(Constants.SALESFORCE_URL);
NameValuePair[] data = {
new NameValuePair("oid", Constants.SALESFORCE_OID),
new NameValuePair(Constants.SALESFORCE_CAMPAIGN_ID, contactType)
};
post.setRequestBody(data);
我想添加给定的数据和数据并将其作为发布请求发送。你们能建议我如何附加两者吗?