Sending POST data from iphone over SSL HTTPS

前端 未结 4 1245
予麋鹿
予麋鹿 2020-11-30 17:13

Hai all,

In my iphone project i need to pass the user name and password to a web server,previously i pass data using GET method and used the url with GET format (eg:

4条回答
  •  盖世英雄少女心
    2020-11-30 17:55

    To debug HTTP issues, your best bet is to get the Charles HTTP proxy app - it will record all HTTP communication to and from a server, through the simulator (and you can even set it as a proxy for the phone if you need to).

    Then, use the program Curl (from Terminal, it is built in) to generate a working post request (you'll have to search online for examples of using CURL). Then you simply compare how a working request from CURL is formatted, to what your application is sending... note that the simulator is automatically re-directed to work through Charles, you have to tell curl the proxy address to use to have things sent through Charles.

提交回复
热议问题