0

I would like send data to server to get response.

I used ASIFormDataRequest, NSMutableURLRequest, NSURLSessionConfiguration.

But i did not get the response.

I tried in these ways

Response

Please guide me. or suggest me any other ways.

Thank you.

Babul
  • 1,268
  • 2
  • 15
  • 42

1 Answers1

1

The best practice is to use AFNetworking :

https://github.com/AFNetworking/AFNetworking

There is a lot of data you can find to get guided, for example:

http://www.raywenderlich.com/59255/afnetworking-2-0-tutorial

AFNetworking Post Request

Community
  • 1
  • 1
Yossi
  • 2,525
  • 2
  • 21
  • 24
  • i tried this one http://stackoverflow.com/questions/7623275/afnetworking-post-request. I got this response NSLocalizedDescription=Request failed: internal server error (500)} – Babul Nov 20 '14 at 12:57
  • @Babul Try to simulate the request, in order to understand where is the issue (In client, Or in server), by tools like https://chrome.google.com/webstore/detail/dhc-resthttp-api-client/aejoelaoggembcahagimdiliamlcdmfm?hl=en – Yossi Nov 20 '14 at 12:57
  • 1
    @Babul maybe this is better tool: https://chrome.google.com/webstore/detail/rest-console/cokgbflfommojglbmbpenpphppikmonn?hl=en – Yossi Nov 20 '14 at 13:00
  • If you are getting 500 from your server, then the server code is not working. This could be the data you are sending isn't what its expecting or a bug in the code on the server side – Flexicoder Nov 20 '14 at 13:09
  • @Flexicoder , basically you are right, but maybe the problem is in the way he sends the request from the app, so it is good idea to test it on another client anyway – Yossi Nov 20 '14 at 13:11