File tree Expand file tree Collapse file tree
Sources/NetworkLayer/NetworkLayer.docc Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1212</p >
1313
1414## Description
15- ` network-layer ` description .
15+ ` network-layer ` is a library for network communication .
1616
1717- [ Usage] ( #usage )
18+ - [ Documentation] ( #documentation )
1819- [ Requirements] ( #requirements )
1920- [ Installation] ( #installation )
2021- [ Communication] ( #communication )
2425
2526## Usage
2627
28+ ``` swift
29+ import NetworkLayer
30+ import NetworkLayerInterfaces
31+
32+ struct Request : IRequest {
33+ var domainName: String {
34+ " https://example.com"
35+ }
36+
37+ var path: String {
38+ " user"
39+ }
40+
41+ var httpMethod: HTTPMethod {
42+ .get
43+ }
44+ }
45+
46+ let request = Request ()
47+ let requestProcessor = NetworkLayerAssembly ().assemble ()
48+ let user: User = try await requestProcessor.send (request)
49+ ```
50+
51+ ## Documentation
52+
53+ Check out [ network-layer documentation] ( https://github.com/space-code/network-layer/blob/main/Sources/NetworkLayer/NetworkLayer.docc/NetworkLayer.md ) .
54+
2755## Requirements
56+ - iOS 13.0+ / macOS 10.15+ / tvOS 13.0+ / watchOS 7.0+ / visionOS 1.0+
57+ - Xcode 14.0
58+ - Swift 5.7
2859
2960## Installation
3061### Swift Package Manager
Original file line number Diff line number Diff line change 7474}
7575
7676```
77+
Original file line number Diff line number Diff line change @@ -27,34 +27,4 @@ network-layer is available under the MIT license. See the LICENSE file for more
2727
2828- < doc:GettingStarted >
2929- < doc:Authentication >
30- - < doc:Retry >
31-
32- <!-- ### Network Layer Creation-->
33- <!-- -->
34- <!-- - ``INetworkLayerAssembly``-->
35- <!-- -->
36- <!-- ### Request and Response Models-->
37- <!-- -->
38- <!-- - ``Configuration``-->
39- <!-- - ``HTTPMethod``-->
40- <!-- - ``RequestBody``-->
41- <!-- - ``IRequest``-->
42- <!-- - ``Response``-->
43- <!-- -->
44- <!-- ### Errors-->
45- <!-- -->
46- <!-- - ``NetworkLayerError``-->
47- <!-- - ``AuthenticatorInterceptorError``-->
48- <!-- -->
49- <!-- ### Authentication-->
50- <!-- -->
51- <!-- - ``IAuthenticationCredential``-->
52- <!-- - ``IAuthenticationInterceptor``-->
53- <!-- - ``IAuthenticator``-->
54- <!-- -->
55- <!-- ### Services-->
56- <!-- -->
57- <!-- - ``IDataRequestHandler``-->
58- <!-- - ``IRequestBuilder``-->
59- <!-- - ``IRequestProcessor``-->
60- <!-- - ``RequestProcessorDelegate``-->
30+ - <doc: Retry
You can’t perform that action at this time.
0 commit comments