Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
mrgrauel committed Feb 18, 2021
1 parent 915c033 commit 63ce5fe
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -198,4 +198,4 @@ DEPENDENCIES
fastlane

BUNDLED WITH
2.2.10
2.2.11
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,15 @@ public struct Mock: Decodable {
}

let url = URL(string: "https://test.com/mock")!
let endpoint = DecodableEndpoint<Mock>(url: url)

URLSession.shared.dataTaskPublisher(for: endpoint)
let endpoint = Request<MockResource>(
url: url,
method: .get([
.init(name: "foobar", value: "1"),
.init(name: "barfoo", value: "2")
])
)

URLSession.shared.publisher(for: endpoint)
.sink( receiveCompletion: { completion in
print(completion)
},
Expand Down

0 comments on commit 63ce5fe

Please sign in to comment.