POST 요청을 만들려고하는데 작동하지 않습니다.C# HttpClient POST 요청
이/3 PARAMS, accountidentifier/유형이 요청의 형식입니다
http://someSite.com/api/User_Favorites.php?accountid=accountidentifier&type=type&seriesid=seriesid
을 seriesid 이것은 내 C#
using (var httpClient = new HttpClient())
{
httpClient.BaseAddress = new Uri("http://somesite.com");
var content = new FormUrlEncodedContent(new[]
{
new KeyValuePair<string, string>("accountidentifier", accountID),
new KeyValuePair<string, string>("type", "add"),
new KeyValuePair<string, string>("seriesid", seriesId),
});
httpClient.PostAsync("/api/User_Favorites.php", content);
}
어떤 아이디어가?
게시물을 호출 할 때 전체 URI가 httpClient 인 것을 디버그하여 볼 수 있습니까? –
언급 한 매개 변수는'URI' ('?'다음의 질의 부분)의 일부이지만'content'로 보냅니다. – user1908061
@ Cubicle.Jockey는 실제로 그것을 찾을 수 없습니다. – allocator