我正在使用windows.web.http
我打電話web請求如下圖所示存儲會話公衆在C#
namespace service
{
public class getserinfo
{
public async Task<bool> call()
{
var client = new HttpClient();
var uri = new Uri(www.example.com/db/login);
var response = await client.PostAsync(uri);
var session = await response.Content.ReadAsStringAsync(); //here it returns session which I need in classes in another for accessing different paths
}
}
}
如何存放session ID
爲public
可以在任何類訪問。
這可能會幫助你。請參考這個[session](http://stackoverflow.com/questions/621549/how-to-access-session-variables-from-any-class-in-asp-net) – Invader