Skip to content

Commit 3920d5d

Browse files
committed
Update Networking.swift
1 parent 4ddf588 commit 3920d5d

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

Source/Networking.swift

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,17 +61,13 @@ public class Networking {
6161
stubsInstance.stubbedGETResponses[path] = response
6262
}
6363

64-
public class func stubPOST(path: String, response: AnyObject) {
65-
stubsInstance.stubbedPOSTResponses[path] = response
66-
}
67-
6864
// TODO: Return error
6965
public class func stubGET(path: String, fileName: String, bundle: NSBundle = NSBundle.mainBundle()) {
7066
let (result, _) = JSON.from(fileName, bundle: bundle)
7167
stubsInstance.stubbedGETResponses[path] = result
7268
}
7369

74-
// MARK: POST
70+
// MARK: - POST
7571

7672
public func POST(path: String, params: AnyObject?, completion: (JSON: AnyObject?, error: NSError?) -> ()) {
7773
let request = NSMutableURLRequest(URL: self.urlForPath(path))
@@ -136,6 +132,12 @@ public class Networking {
136132
}
137133
}
138134

135+
public class func stubPOST(path: String, response: AnyObject) {
136+
stubsInstance.stubbedPOSTResponses[path] = response
137+
}
138+
139+
// MARK: - Others
140+
139141
public func urlForPath(path: String) -> NSURL {
140142
return NSURL(string: self.baseURL + path)!
141143
}

0 commit comments

Comments
 (0)