Skip to content

Releases: 3lvis/Networking

Networking — 0.20.0

20 Apr 12:44
Compare
Choose a tag to compare

Added a new method to cancel an image download using a full path, instead of a relative one.

func cancelImageDownload(fullPath path: String)

Networking — 0.19.0

19 Apr 11:22
Compare
Choose a tag to compare
  • Fix stringByAddingPercentEscapesUsingEncoding deprecation
  • Improve support for links with strange characters, for example ø/å/ü and others
  • Make POST parameters optional
  • Added Carthage suport

NetworkActivityIndicator — 0.18.2

12 Apr 11:18
Compare
Choose a tag to compare
  • Update TestCheck with fix for Xcode 7.3

Networking — 0.18.1

23 Mar 11:34
Compare
Choose a tag to compare
  • Update for Swift 2.2
  • Remove dependencies

Networking — 0.18.0

17 Mar 15:08
Compare
Choose a tag to compare
  • Add a method to download an image by providing the full path. The main good thing about this is that the cache is shared.
public func downloadImage(fullPath path: String, completion: (image: UIImage?, error: NSError?) -> ()) 
  • Fixed a 🐛 where failed photo downloads wouldn't return the error.
  • Added support for custom ContentTypes. Before it was only possible to use JSON and FormURLEncoded as the ContentType. Now when making a request you can provide any ContentType!
let networking = Networking(baseURL: "http://httpbin.org")
networking.POST("/post", contentType: .Custom("MyMomLovesMe"), parameters: ["custname":"jameson"]) { JSON, error in
   // Successfull post using `application/x-www-form-urlencoded` as `Content-Type`
}

Networking — 0.17.0

05 Feb 10:33
Compare
Choose a tag to compare

✨ NEW ✨ Custom authentication header

authenticate(authenticationHeader: "Token token=CUSTOM")

⚠️ Breaking changes ⚠️

Basic auth

Before:

authenticate("username", password: "password")

After:

authenticate(username: "username", password: "password")

Token

Before:

authenticate("token")

After:

authenticate(token: "token")

Networking — 0.16.0

24 Jan 09:27
Compare
Choose a tag to compare

⚠️ This release has a breaking change ⚠️

Replaces all stubbing methods with fake instead (#57):

  • stubGET now is fakeGET
  • stubPOST now is fakePOST
  • stubPUT now is fakePUT
  • stubDELETE now is fakeDELETE
  • stubImageDownload now is fakeImageDownload

The reasoning behind this change is that it helps making this feature being more accessible to users that don’t need much introduction into what stubbing or mocking means.

Networking — 0.15.0

20 Jan 11:20
Compare
Choose a tag to compare
  • Stubbing failures: Now you can provide a status code when stubbing endpoint calls, if the status code is 2XX the response object will be returned, otherwise we will return an NSError containing the status code and a proper description.
  • NetworkingStatusCodeType: 0.15.0 introduces a new and nicer way to categorize status codes, now you can use the statusCodeType() method in any Int, it will return any of the following cases:
/**
 Categorizes a status code.
 - `Informational`: This class of status code indicates a provisional response, consisting only of the Status-Line and optional headers, and is terminated by an empty line.
 - `Successful`: This class of status code indicates that the client's request was successfully received, understood, and accepted.
 - `Redirection`: This class of status code indicates that further action needs to be taken by the user agent in order to fulfill the request.
 - `ClientError:` The 4xx class of status code is intended for cases in which the client seems to have erred.
 - `ServerError:` Response status codes beginning with the digit "5" indicate cases in which the server is aware that it has erred or is incapable of performing the request.
 - `Unknown:` This response status code could be used by Foundation for other types of states, for example when a request gets cancelled you will receive status code -999
 */
public enum NetworkingStatusCodeType {
    case Informational, Successful, Redirection, ClientError, ServerError, Unknown
}

Networking — 0.14.2

14 Jan 12:32
Compare
Choose a tag to compare
  • Fixed: Image cache wasn't using the right keys, hence it wasn't being used.

Networking — 0.14.1

27 Dec 22:32
Compare
Choose a tag to compare
  • Improve logging with correct responses for different contentTypes