How to send request in JSON format using TTURLRequest?

64 Views Asked by At

I have recently suffered from a problem regarding TTURLRequest.

I have been using Three20 framework for several months and I know that there are two ways of sending requests using TTURLRequest.

  1. Using url combined with parameters, such as http://www.test.com/test?username=u&password=p

  2. Using build-in parameter property in NSMutableDictionary format and the parameters are set like this:

    TTURLRequest *request = [TTURLRequest requestWithURL:url delegate:self]; [request.parameter setObject:@"obj" forKey:@"o"];

The problem for now is that I need to send a request with JSON format.

Is it possible to convert the request.parameter to a JSON format? Or, should I implement a JSON format property for TTURLRequest to send the request?

0

There are 0 best solutions below