nst / STHTTPRequest

Obj-C / Cocoa HTTP requests for humans
BSD 3-Clause "New" or "Revised" License
826 stars 75 forks source link

Is there a plan to support NSURLSession? #31

Closed yoshimin closed 9 years ago

yoshimin commented 9 years ago

NSURLConnection is Deprecated from iOS9. Will you fix this library? Can I send the pull request as following one? https://github.com/yoshimin/STHTTPRequest/commit/267f47276fc3ae1c0a54c3094f1958df23bdaf76

nst commented 9 years ago

Yes, there is a plan to support NSURLSession.

If you want to submit a pull request, I think you can remove all occurrences of NSURLConnection.

Also, please ensure that all tests still pass.

yoshimin commented 9 years ago

Thank you for reply. I have 3 more questions.

  1. If STHTTPRequest is implemented only with NSURLSession, will support for iOS6(or older) be dropped?
  2. Is it possible to make STHTTPRequest uses both NSURLConnection and NSURLSession so that it supports iOS6(or older) and iOS7(or newer)?
  3. If #2 is possible, When will these fixes be merged to master branch?
nst commented 9 years ago
  1. yes
  2. it's possible but I'd prefer not to
  3. I'd rather merge a pull request dropping NSURLConnection completely

I would tag the current version as the last one supporting iOS 6.

yoshimin commented 9 years ago

Sorry to reply late. My App supports also iOS6. So, I will fork STHTTPRequest(tagged current version) and fix. Thank you.

garrettmurray commented 9 years ago

@nst As we're nearing release of an iOS 8+ app utilizing STTwitter (which relies on this lib), and we need to support background uploading using NSURLSession, I'm curious what the estimated timeframe is for STHTTPRequest to make the transition to Session. Should we build this ourselves in a local fork or is the transition coming imminently?

nst commented 9 years ago

I'm working on it. STTwitter will use NSURLSession before the end of August.

nst commented 9 years ago

A preliminary version is available in https://github.com/nst/STHTTPRequest/tree/master/STHTTPRequest2

It still doesn't support background upload, though.

nst commented 9 years ago

https://github.com/nst/STHTTPRequest/tree/master/STHTTPRequest2 is still a dev version but now supports background uploads.

nst commented 9 years ago

STTwitter (head version) now supports NSURLSession.

nst commented 9 years ago

I consider https://github.com/nst/STHTTPRequest/tree/master/STHTTPRequest2 as ready, so I close this issue.