Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
white49
Alamofire
提交
a90f2e59
A
Alamofire
项目概览
white49
/
Alamofire
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
A
Alamofire
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
a90f2e59
编写于
8月 24, 2015
作者:
C
Christian Noon
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #707 from mishagray/xcode7b6
上级
e489c5fe
6ad672cc
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
9 addition
and
9 deletion
+9
-9
Example/DetailViewController.swift
Example/DetailViewController.swift
+1
-1
Source/Manager.swift
Source/Manager.swift
+1
-1
Source/ParameterEncoding.swift
Source/ParameterEncoding.swift
+1
-1
Source/Request.swift
Source/Request.swift
+3
-3
Tests/ParameterEncodingTests.swift
Tests/ParameterEncodingTests.swift
+1
-1
Tests/UploadTests.swift
Tests/UploadTests.swift
+2
-2
未找到文件。
Example/DetailViewController.swift
浏览文件 @
a90f2e59
...
...
@@ -148,7 +148,7 @@ extension DetailViewController {
switch
Sections
(
rawValue
:
indexPath
.
section
)
!
{
case
.
Headers
:
let
cell
=
tableView
.
dequeueReusableCellWithIdentifier
(
"Header"
)
!
let
field
=
headers
.
keys
.
array
.
sort
(
<
)[
indexPath
.
row
]
let
field
=
headers
.
keys
.
sort
(
<
)[
indexPath
.
row
]
let
value
=
headers
[
field
]
cell
.
textLabel
?
.
text
=
field
...
...
Source/Manager.swift
浏览文件 @
a90f2e59
...
...
@@ -58,7 +58,7 @@ public class Manager {
}
}
return
","
.
join
(
components
)
return
components
.
joinWithSeparator
(
","
)
}()
// User-Agent Header; see https://tools.ietf.org/html/rfc7231#section-5.5.3
...
...
Source/ParameterEncoding.swift
浏览文件 @
a90f2e59
...
...
@@ -88,7 +88,7 @@ public enum ParameterEncoding {
components
+=
queryComponents
(
key
,
value
)
}
return
"&"
.
join
(
components
.
map
{
"
\(
$0
)
=
\(
$1
)
"
}
as
[
String
]
)
return
(
components
.
map
{
"
\(
$0
)
=
\(
$1
)
"
}
as
[
String
])
.
joinWithSeparator
(
"&"
)
}
func
encodesParametersInURL
(
method
:
Method
)
->
Bool
{
...
...
Source/Request.swift
浏览文件 @
a90f2e59
...
...
@@ -444,7 +444,7 @@ extension Request: CustomStringConvertible {
components
.
append
(
"(
\(
response
.
statusCode
)
)"
)
}
return
" "
.
join
(
components
)
return
components
.
joinWithSeparator
(
" "
)
}
}
...
...
@@ -473,7 +473,7 @@ extension Request: CustomDebugStringConvertible {
authenticationMethod
:
NSURLAuthenticationMethodHTTPBasic
)
if
let
credentials
=
credentialStorage
.
credentialsForProtectionSpace
(
protectionSpace
)?
.
values
.
array
{
if
let
credentials
=
credentialStorage
.
credentialsForProtectionSpace
(
protectionSpace
)?
.
values
{
for
credential
in
credentials
{
components
.
append
(
"-u
\(
credential
.
user
!
)
:
\(
credential
.
password
!
)
"
)
}
...
...
@@ -526,7 +526,7 @@ extension Request: CustomDebugStringConvertible {
components
.
append
(
"
\"\(
URL
!.
absoluteString
)\"
"
)
return
"
\\\n\t
"
.
join
(
components
)
return
components
.
joinWithSeparator
(
"
\\\n\t
"
)
}
/// The textual representation used when written to an output stream, in the form of a cURL command.
...
...
Tests/ParameterEncodingTests.swift
浏览文件 @
a90f2e59
...
...
@@ -322,7 +322,7 @@ class URLParameterEncodingTestCase: ParameterEncodingTestCase {
"japanese=%E6%97%A5%E6%9C%AC%E8%AA%9E"
]
let
expectedQuery
=
"&"
.
join
(
expectedParameterValues
)
let
expectedQuery
=
expectedParameterValues
.
joinWithSeparator
(
"&"
)
XCTAssertEqual
(
URLRequest
.
URL
?
.
query
??
""
,
expectedQuery
,
"query is incorrect"
)
}
...
...
Tests/UploadTests.swift
浏览文件 @
a90f2e59
...
...
@@ -594,7 +594,7 @@ class UploadMultipartFormDataTestCase: BaseTestCase {
loremValues
.
append
(
"Lorem ipsum dolor sit amet, consectetur adipiscing elit."
)
}
return
" "
.
join
(
loremValues
)
.
dataUsingEncoding
(
NSUTF8StringEncoding
,
allowLossyConversion
:
false
)
!
return
loremValues
.
joinWithSeparator
(
" "
)
.
dataUsingEncoding
(
NSUTF8StringEncoding
,
allowLossyConversion
:
false
)
!
}()
let
loremData2
:
NSData
=
{
var
loremValues
:
[
String
]
=
[]
...
...
@@ -602,7 +602,7 @@ class UploadMultipartFormDataTestCase: BaseTestCase {
loremValues
.
append
(
"Lorem ipsum dolor sit amet, nam no graeco recusabo appellantur."
)
}
return
" "
.
join
(
loremValues
)
.
dataUsingEncoding
(
NSUTF8StringEncoding
,
allowLossyConversion
:
false
)
!
return
loremValues
.
joinWithSeparator
(
" "
)
.
dataUsingEncoding
(
NSUTF8StringEncoding
,
allowLossyConversion
:
false
)
!
}()
let
expectation
=
expectationWithDescription
(
"multipart form data upload should succeed"
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录