get in touch

LIKE

SHARE

FOLLOW

Ovidiu Nitan

iOS Developer at ASSIST

LRResty is a simple to use library for Objective-C useful for accessing REST-based APIs. Its development is discontinued now and developers are encouraged to use other libraries instead (such ASIHTTPRequest) but LRResty is easier to use and more adapted for REST services.

One of the issues with LRResty is that it doesn't support HTTP PATCH operations. Fortunately is not really hard to add support for this, starting from the other routines which offer support for other operations, such as GET or PUT. This Objective-C category adds support for PATCH and is designed for ARC-based version of LRResty. This category is offered as it is, and you can modify or use it without any restriction.

#pragma mark -
#pragma mark Delegate API

/**
 Performs a PATCH request with a payload on URL with delegate response handling.
 @param urlString   The URL to request.
 @param payload     The object to PATCH.
 @param delegate    The response delegate.
 @returns The request object.
 @see LRRestyRequestPayload
 */
 - (LRRestyRequest *)patch:(NSString *)urlString payload:(id)payload delegate:(id<lrrestyclientresponsedelegate>)delegate;

/**
 Performs a PATCH request with a payload on URL with delegate response handling.
 @param urlString   The URL to request.
 @param delegate    The response delegate.
 @returns The request object.
 @see LRRestyRequestPayload
 */
 - (LRRestyRequest *)patch:(NSString *)urlString payload:(id)payload headers:(NSDictionary *)headers delegate:(id<lrrestyclientresponsedelegate>)delegate;

Download

Do you want to get in touch with us? 

If you are interested in our software development services, you would like to join our team, or you simply want to find out more about us, we’d love to hear from you! Drop us a line and a member of the ASSIST team will get back to you as soon as possible. We are sure we can ASSIST you.

GET IN TOUCH