Skip to content
endSly edited this page Feb 21, 2013 · 2 revisions

Tenzing Core - REST Service

TenzingCore also provides a clean interface to map rest services into code. It's provided in a separate module and depends on TenzingCore base classes.

TZRESTService

TZRESTService is the base class for any mapped service and web service methods are defined on it. This class provides methods for mapping HTTP verbs.

+ (void)get:(NSString *)path    class:(Class)class  as:(SEL)sel;
+ (void)post:(NSString *)path   class:(Class)class  as:(SEL)sel;
+ (void)post:(NSString *)path   class:(Class)class  as:(SEL)sel multipart:(BOOL)multipart;
+ (void)put:(NSString *)path    class:(Class)class  as:(SEL)sel;
+ (void)delete:(NSString *)path class:(Class)class  as:(SEL)sel;

Those methods dynamically generates methods for getting objects of class class at path path and adds this method to current class with signature given by sel

Clone this wiki locally