gpt4 book ai didi

Android HttpPost获取参数

转载 作者:塔克拉玛干 更新时间:2023-11-01 21:27:51 26 4
gpt4 key购买 nike

我有以下用于进行网络通话的代码。服务器在下面返回一个错误,表明参数过多。我发送了 20 个参数,web 服务中有 20 个参数。

它们是一种显示我在执行帖子之前发送的参数的方式吗?

提前致谢。

try {
// Add your data
nameValuePairs = new ArrayList<NameValuePair>(2);
nameValuePairs.add(new BasicNameValuePair("ID1", compID));
nameValuePairs.add(new BasicNameValuePair("ID2", companyGuid));
nameValuePairs.add(new BasicNameValuePair("CompanyID", compID));
nameValuePairs.add(new BasicNameValuePair("TagID", tagID));
nameValuePairs.add(new BasicNameValuePair("ClientID", clientID));
nameValuePairs.add(new BasicNameValuePair("CarerID", carerID));
nameValuePairs.add(new BasicNameValuePair("PhoneScanned", phoneScanned));
nameValuePairs.add(new BasicNameValuePair("PhoneSent", phoneSent));
nameValuePairs.add(new BasicNameValuePair("TXType", TXType));
nameValuePairs.add(new BasicNameValuePair("PhoneType", phoneType));
nameValuePairs.add(new BasicNameValuePair("Latitude", latitude));
nameValuePairs.add(new BasicNameValuePair("Longitude", longitude));
nameValuePairs.add(new BasicNameValuePair("Driver", driver));

nameValuePairs.add(new BasicNameValuePair("WiFiOn", wifiOn));
nameValuePairs.add(new BasicNameValuePair("AndroidVersion", androidVersion));
nameValuePairs.add(new BasicNameValuePair("RRVersion", rrVersion));
nameValuePairs.add(new BasicNameValuePair("BatteryStrength", batteryStrength));
nameValuePairs.add(new BasicNameValuePair("GPSOn", gpsOn));
nameValuePairs.add(new BasicNameValuePair("ManualButton", manualButton));
nameValuePairs.add(new BasicNameValuePair("CarerSignedBackIn", carerSignedBackIn));



httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));



// Execute HTTP Post Request
Log.e(TAG, "about to execute http post");
HttpResponse response = httpclient.execute(httppost);
Log.e(TAG, "just executed http post");
String responseBody = EntityUtils.toString(response.getEntity());
Log.e(TAG, "responseBody for RRPostTransactionNew = " + responseBody);



DomParser dp = new DomParser(context);
serviceStatus = dp.getPostTransactionResponseCode(responseBody);

Log.e(TAG, "serviceStatus = " + serviceStatus);

.

Error: RRPostTransactionNew-Procedure or function RR2_PostTransactionNew has too many arguments specified.

最佳答案

您可以使用代理并查看所有请求和响应 https://www.charlesproxy.com/

关于Android HttpPost获取参数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34178360/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com