The following code authenticates and creates a new file property named 'foo' with a text value. A description of the change is set as well.
Plug p = Plug.New("http://devwiki/@api/deki");
p.At("users", "authenticate")
.WithCredentials("sysop", "password").Get();
p.At("files", "42", "properties")
.WithHeader("Slug", "foo")
.With("description", "initial value")
.Post(DreamMessage.Ok(MimeType.TEXT_UTF8, "My Value"));
<property name="foo" href="http://devwiki/@api/deki/files/42/properties/foo/info" etag="4463.r1_ts2009-03-20T22:48:15Z">
<contents type="text/plain; charset=utf-8" href="http://devwiki/@api/deki/files/42/properties/foo">My Value</contents>
<date.modified>2009-03-20T22:48:15Z</date.modified>
<user.modified id="1" href="http://devwiki/@api/deki/users/1">
<nick>Sysop</nick>
<username>Sysop</username>
</user.modified>
<change-description>initial value</change-description>
</property>
Add notes about requirements or config values
| Images 0 | ||
|---|---|---|
| No images to display in the gallery. |
Copyright © 2011 MindTouch, Inc. Powered by