On 1 Jun 2010, at 11:03, Joshua Tucker wrote: > has anyone got any sample code for a POST request for interfacing with an API > such as the DirectAdmin API? > > Ideally, something that works like this in Obj-C (example is in PHP) would be > great: http://www.directadmin.com/sample_api.txt. The API documentation is at > http://www.directadmin.com/api.html but I haven't been able to make any sense > of it.
You should be able to use NSURLRequest for this. Looks from the API as if you stick the command name in the URL, and pass the other arguments as form parameters in the usual way; see <http://www.w3.org/TR/REC-html40/interact/forms.html#h-17.13.4> for information about form encoding. Kind regards, Alastair. -- http://alastairs-place.net _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com