Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
AppleLibs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tobias Ullerich
AppleLibs
Commits
4541b90a
Commit
4541b90a
authored
3 years ago
by
Tobias Ullerich
Browse files
Options
Downloads
Patches
Plain Diff
Make DataManager extendable, remove print
parent
2150e2b4
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
AppleLibs/Network/Requests/DataManager.swift
+1
-3
1 addition, 3 deletions
AppleLibs/Network/Requests/DataManager.swift
with
1 addition
and
3 deletions
AppleLibs/Network/Requests/DataManager.swift
+
1
−
3
View file @
4541b90a
...
@@ -26,7 +26,7 @@ public protocol DataManagerDelegate
...
@@ -26,7 +26,7 @@ public protocol DataManagerDelegate
func
manipulateRequest
(
request
:
Request
)
->
Request
func
manipulateRequest
(
request
:
Request
)
->
Request
}
}
public
class
DataManager
:
NSObject
,
URLSessionDelegate
open
class
DataManager
:
NSObject
,
URLSessionDelegate
{
{
public
enum
DataManagerError
:
Error
public
enum
DataManagerError
:
Error
{
{
...
@@ -92,8 +92,6 @@ public class DataManager: NSObject, URLSessionDelegate
...
@@ -92,8 +92,6 @@ public class DataManager: NSObject, URLSessionDelegate
@available
(
macCatalyst
15.0
.
0
,
*
)
@available
(
macCatalyst
15.0
.
0
,
*
)
@discardableResult
@discardableResult
public
func
request
(
request
r
:
Request
,
dataMapper
:
DataMapper
?
=
nil
,
sender
:
Any
?
=
nil
)
async
throws
->
Any
?
{
public
func
request
(
request
r
:
Request
,
dataMapper
:
DataMapper
?
=
nil
,
sender
:
Any
?
=
nil
)
async
throws
->
Any
?
{
print
(
"Request:
\(
r
)
"
)
let
request
=
delegate
?
.
manipulateRequest
(
request
:
r
)
??
r
let
request
=
delegate
?
.
manipulateRequest
(
request
:
r
)
??
r
guard
let
req
:
URLRequest
=
createUrlRequest
(
request
:
request
)
else
{
guard
let
req
:
URLRequest
=
createUrlRequest
(
request
:
request
)
else
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment