Skip to content

Commit

Permalink
ignoring query example swap i/o url
Browse files Browse the repository at this point in the history
  • Loading branch information
GeRryCh committed May 24, 2020
1 parent 9ef9237 commit a8021dc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ URLSession.shared.dataTask(with: originalURL) { (data, response, error) in
Some URLs like authentication URLs contain timestamps or UUIDs in the query. To mock these you can ignore the Query for a certain URL:

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

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

0 comments on commit a8021dc

Please sign in to comment.