Skip to content

Commit

Permalink
Adds Pre-built framework 2.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
s4cha committed Jan 30, 2017
1 parent b6345cf commit 8cd9f8c
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 3 deletions.
20 changes: 19 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ ws.get("/users").then { json in

## Swift Version
Swift 2 -> version **1.3.0** ios8+
Swift 3 -> version **2.0.0** ios9+
Swift 3 -> version **2.0.1** ios8+


## Why
Expand Down Expand Up @@ -208,6 +208,24 @@ existingArticle.delete().then {
}
```


### HTTP Status code

When a request fails, we often want to know the reason thanks to the HTTP status code.
Here is how to get it :

```swift
ws.get("/users").then {
// Do something
}.onError { e in
if let wsError = e as? WSError {
print(wsError.status)
print(wsError.status.rawValue) // RawValue for Int status
}
}
```
You can find the full `WSError` enum here -> https://github.com/freshOS/ws/blob/master/ws/WSError.swift

## Bonus - Load More pattern

Very often we deal we lists and the ability to `load more` items.
Expand Down
Binary file added ws.framework.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion ws.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "ws"
s.version = "2.0.0"
s.version = "2.0.1"
s.summary = "Elegant JSON WebService for Swift ☁️"
s.homepage = "https://github.com/freshOS/ws"
s.license = { :type => "MIT", :file => "LICENSE" }
Expand Down
2 changes: 1 addition & 1 deletion ws/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>2.0.0</string>
<string>2.0.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down

0 comments on commit 8cd9f8c

Please sign in to comment.