c# - I have a desktop application and I want to send a POST to a webpage and then show that webpage -
i have desktop application has classes, want serialize , send webpage when user clicks button in desktop c# application.
the data long argument. want achieve here is, how post , open website on clients pc dynamic changes made sent data ?
need suggestions or guidance proceed in right direction.
you can use httpclient
for example:
using (var client = new httpclient()) { client.baseaddress = new uri("http://myurl"); var gizmo = new product() { name = "gizmo", price = 100, category = "widget" }; response = await client.postasjsonasync("api/products", gizmo); if (response.issuccessstatuscode) { //do } }
Comments
Post a Comment