am setting the parameters(key-value pairs – user name, password, email id) for NSMutableURLRequest(POST) using the class method
+ (void)setProperty:(id)value forKey:(NSString *)key inRequest:(NSMutableURLRequest *)request
and requesting the server using sendSynchronous.
But at the server end, the parameters are null.
plz suggest me some other new solution???
Use
ASIFormDataRequest. Its-setPostValue:forKey:method makes POSTing data asapplication/x-www-urlformencodedormultipart/form-datadead simple.If you want to use
NSURLRequestinstead, check out the OAuthConsumer project for an example of usingapplication/x-www-form-urlencoded. Start by reading-setParameters:inNSMutableURLRequest+Parameters.m and go from there. For sending data asmultipart/form-datausingNSURLRequest`, see Facebook’s FBRequest.+[NSURLProtocol setProperty:forKey:inRequest:]is intended to be used to extend the URL loading system to support additional protocols: