Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Objective-C C
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
Multipart-FormData.xcodeproj
Multipart-FormData
.gitignore
README.md

README.md

Network code example for the 3rd homework

Note: this project demonstrates multipart-http request for image uploading. You are advised to use that code + adjust Item model, its properties, initWithJSONObject: and JSONObject methods.

Warning: some values are hardcoded such as items/4.

NetworkService.h

(void)createFriend:(Item *)item success:(void (^)(Item *item))onSuccess failure:(void (^)())onFailure;

creates a new friend

(void)updateFriend:(Item *)item withImage:(UIImage *)anImage success:(void (^)(Item *item))onSuccess failure:(void (^)())onFailure;

the current implementation updated the image ONLY, use the regular PUT to update normal properties (such as Name, status, latitude, longitude and gender) or update this method (not recommended as it might be time consuming and frustrating).

Something went wrong with that request. Please try again.