私は (C# に関する限り) ネットワークの種類はあまり得意ではありませんが、データを (取得ではなく) Web URL に投稿し、それが出力するものを返す必要があります。
これまでのところ、これを投稿に使用して、ログインしているかどうかを判断しています。
//credentials
string username = textBox1.Text;
string password = textBox2.Text;
using (WebClient client = new WebClient())
{
byte[] data = Encoding.Default.GetBytes("username="+username+"&password="+password);
client.Headers["Content-Type"] = "application/Json";
try
{
var response2 = client.UploadData(base_url + "/users/authenticate", "POST", data);
MessageBox.Show(Encoding.Default.GetString(response2));
}
catch { }
}
注: エラーは 400 bad request です。何か案は?