Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
GMPhobos
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gengmeiios
GMPhobos
Commits
e741a4ec
Commit
e741a4ec
authored
Dec 04, 2018
by
朱璇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改请求方式
parent
58c8b280
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
8 deletions
+3
-8
PhobosUtil.m
GMPhobos/Classes/PhobosUtil.m
+3
-8
No files found.
GMPhobos/Classes/PhobosUtil.m
View file @
e741a4ec
...
@@ -123,17 +123,12 @@
...
@@ -123,17 +123,12 @@
NSURLSession
*
session
=
[
NSURLSession
sharedSession
];
NSURLSession
*
session
=
[
NSURLSession
sharedSession
];
__block
NSString
*
result
=
@""
;
__block
NSString
*
result
=
@""
;
NSURLSessionDataTask
*
dataTask
=
[
session
dataTaskWithRequest
:
request
completionHandler
:
^
(
NSData
*
_Nullable
data
,
NSURLResponse
*
_Nullable
response
,
NSError
*
_Nullable
error
)
{
NSURLSessionDataTask
*
dataTask
=
[
session
dataTaskWithRequest
:
request
completionHandler
:
^
(
NSData
*
_Nullable
data
,
NSURLResponse
*
_Nullable
response
,
NSError
*
_Nullable
error
)
{
if
(
!
error
)
{
if
(
!
error
)
{
//没有错误,返回正确;
//没有错误,返回正确;
result
=
[[
NSString
alloc
]
initWithData
:
data
encoding
:
NSUTF8StringEncoding
];
if
(
success
)
{
NSLog
(
@"返回正确:%@"
,
result
);
success
(
code
);
}
}
else
{
//出现错误;
NSLog
(
@"错误信息:%@"
,
error
);
}
}
}];
}];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment