Skip to content

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
Signed-off-by: Nikhil Nigade <[email protected]>
  • Loading branch information
dezinezync committed Dec 21, 2022
1 parent dfe851f commit 46f649b
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
# DZNetworking
# DZNetworking v3

NSURLSession based networking supporting Swift Concurrency and completion block handler style APIs.
`URLSession` based networking supporting Swift Concurrency and completion block handler style APIs.

DZNetworking exposes simple APIs that make constructing networking models with REST APIs easy.

The API is straight-forward, well tested and extensible. DZNetworking should be treated as a simple wrapper around `URLSession`.

### Supports
- `URLSession` data, download and upload tasks
- Uploads to S3 buckets
- OAuth2 session handler

### Instantiating

DZURLSession makes it really easy to get started. Here's a sample:
Expand All @@ -18,7 +23,7 @@ let (data, _) = try await session.GET("/posts", query: ["userID": "1"])
```

--
The `DZJSONResponseParser` implements the `DZResponseParser` protocol which handles parsing JSON responses. You can implement your own response parsers (example: XML, YAML, etc.) by implementing `DZResponseParser`.
The `DZJSONResponseParser` implements the `DZResponseParser` protocol which handles parsing JSON responses. You can implement your own response parsers (example: XML, YAML, etc.) by conforming your parser to `DZResponseParser`.

You must then assign that response parser to the DZURLSession before making network requests.

Expand Down

0 comments on commit 46f649b

Please sign in to comment.