ASIHTTPRequest vs AFNetworking vs NSUrlRequest

前端 未结 4 575
名媛妹妹
名媛妹妹 2021-02-01 03:29

In the past I have use ASIHTTPRequest but now there is NSURLRequest. Should we be using the NSURLRequest now? Are there any disadvantages

4条回答
  •  一整个雨季
    2021-02-01 04:13

    Native (NSURLSession) vs AFNetworking or any other library.

    I would recommend you to use NSURLSession because it gives you a lot of customization on app end. Recently I was working on a project, I have to use multipart form data some where in the app. I have to provide my request body to the backend guy, I did use AfNetworking logger to print my body but it did not help me. so I did move to cocoa native library and got my solution.

    so I would suggest you to use iOS native networking because it gives you a lot of customization but if you would need less code then you can use any 3rd party library.

提交回复
热议问题