0
現在面臨一個問題,通過參數化的URL發佈從我Entires數據發佈,我不知道爲什麼它的發生,網址張貼後返回一定的消息,下面是我的網址:的Http在Xamarin.Forms
,這是怎麼了我發佈的數據:
void OnSubmitReport(object sender, System.EventArgs e)
{
PostData();
}
public async void PostData()
{
string details = report_details_entry.Text;
string date = nextappointment_entry.Text;
var formContent = new FormUrlEncodedContent(new[]
{
new KeyValuePair<string, string>("unm", USERNAME),
new KeyValuePair<string, string >("assinID", ""+ASSIGNID),
new KeyValuePair<string, string>("details", details),
new KeyValuePair<string, string>("appoi_date", date)
});
var response = await client.PostAsync("http://bbs.eamobiledirectory.com/Mobile/MobileApi.aspx?Action=NewSalesReport",formContent);
}
我想是在條目提交數據後,病房我在DisplayAlert消息中返回的消息。
您的例子顯示了一個GET ,而不是POST。你確定你需要使用POST嗎?代碼中的參數名稱也與示例url中顯示的名稱不匹配。 – Jason
是的,我想發佈@Jason –