-
Notifications
You must be signed in to change notification settings - Fork 11
POST data
JornWildt edited this page Mar 25, 2013
·
1 revision
// All interaction with Ramone goes through a session
ISession session = RamoneConfiguration.NewSession(new Uri("https://example.com"));
// Create a Ramone request by binding URL to session
Request request = session.Bind("some-path");
// Create POST payload as anonymous object
var payload = new
{
Title = "A new item",
Description = "Description of item."
};
// POST data as JSON
using (var response = request.AsJson().Post(payload))
{
// ... do stuff with response ...
}