standardnotes / iOS-classic

iOS client - (Deprecated) - New version: https://github.com/standardnotes/mobile
167 stars 21 forks source link

Remove Alamofire dependency and use native networking library #33

Open moughxyz opened 7 years ago

moughxyz commented 7 years ago

I'm beginning an effort to trim down dependencies cross platform in the name of longevity. There's an easy opportunity here to remove Alamofire and use NSURLSession or NSURLConnection.

jz709u commented 7 years ago

I'll start working on this I've been really busy lately. Not many contributions lately

moughxyz commented 7 years ago

No worries, I think this one can be an easy win.

JacobBoyd commented 7 years ago

@jz709u Have you started on this issue/help wanted? If not I would like to start contributing to the project by tackling this @mobitar.

moughxyz commented 7 years ago

It's all yours! This would be a great improvement.

flowinho commented 7 years ago

The native networking methods can really be quite buggy. Sounds like a great improvement though. Would you like some help @JacobBoyd ?

JacobBoyd commented 7 years ago

Sorry guys, I am starting the this issue now. I was kinda of busy for a while. I will keep this thread updated as I make progress!

JacobBoyd commented 7 years ago

I have set up

GET(_ url: String, parameters: [String: Any], completionHandler: @escaping(_ response: Data) -> (), errorHandler: @escaping(_ error: Error) -> ())

and

POST(_ url: String, parameters: [String : Any], completionHandler: @escaping(_ response: Data) -> (), errorHandler: @escaping(_ error: Error)->()) -> Void

Methods for the new class StandardNotesURLSession. I am working on error handling and accepted http status codes. I am also planning to create a .download() for the class.

moughxyz commented 7 years ago

Feel free to submit the pull request at any time, even if it's still a WIP. This way others can follow along.

I am also planning to create a .download() for the class.

How would that work?