Skip to content

Commit 4529976

Browse files
authored
ignoring query example swap i/o url (#54)
1 parent 9ef9237 commit 4529976

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@ URLSession.shared.dataTask(with: originalURL) { (data, response, error) in
104104
Some URLs like authentication URLs contain timestamps or UUIDs in the query. To mock these you can ignore the Query for a certain URL:
105105

106106
``` swift
107-
/// Would transform to "https://www.example.com/api/authentication?oauth_timestamp=151817037" for example.
108-
let originalURL = URL(string: "https://www.example.com/api/authentication")!
107+
/// Would transform to "https://www.example.com/api/authentication" for example.
108+
let originalURL = URL(string: "https://www.example.com/api/authentication?oauth_timestamp=151817037")!
109109

110110
let mock = Mock(url: originalURL, ignoreQuery: true, dataType: .json, statusCode: 200, data: [
111111
.get : MockedData.exampleJSON.data // Data containing the JSON response

0 commit comments

Comments
 (0)