Skip to content

Commit 652b57d

Browse files
committed
Update README.md
1 parent 3920d5d commit 652b57d

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,20 @@ networking.POST("/post", params: ["username":"jameson", "password":"password"])
5959
}
6060
```
6161

62+
### Stubbing POST
63+
64+
```swift
65+
let story = ["id" : 47333, "title" : "Site Design: Aquest"]
66+
Networking.stubPOST("/story", response: story)
67+
68+
let networking = Networking(baseURL: "https://api-news.layervault.com/api/v2")
69+
networking.POST("/story", params: ["username":"jameson", "password":"password"]) { JSON, error in
70+
if let JSON = JSON {
71+
// Story with id: 47333
72+
}
73+
}
74+
```
75+
6276
## Installation
6377

6478
**Networking** is available through [CocoaPods](http://cocoapods.org). To install

0 commit comments

Comments
 (0)