Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Aniona
java-client
提交
dea6bb18
J
java-client
项目概览
Aniona
/
java-client
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
J
java-client
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
dea6bb18
编写于
5月 10, 2020
作者:
M
Mykola Mokhnach
提交者:
GitHub
5月 10, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: Add new upload options that were introduced recently (#1342)
上级
5af08a1b
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
45 addition
and
0 deletion
+45
-0
src/main/java/io/appium/java_client/screenrecording/ScreenRecordingUploadOptions.java
..._client/screenrecording/ScreenRecordingUploadOptions.java
+45
-0
未找到文件。
src/main/java/io/appium/java_client/screenrecording/ScreenRecordingUploadOptions.java
浏览文件 @
dea6bb18
...
@@ -28,6 +28,9 @@ public class ScreenRecordingUploadOptions {
...
@@ -28,6 +28,9 @@ public class ScreenRecordingUploadOptions {
private
String
user
;
private
String
user
;
private
String
pass
;
private
String
pass
;
private
String
method
;
private
String
method
;
private
String
fileFieldName
;
private
Map
<
String
,
String
>
headers
;
private
Map
<
String
,
Object
>
formFields
;
public
static
ScreenRecordingUploadOptions
uploadOptions
()
{
public
static
ScreenRecordingUploadOptions
uploadOptions
()
{
return
new
ScreenRecordingUploadOptions
();
return
new
ScreenRecordingUploadOptions
();
...
@@ -74,6 +77,45 @@ public class ScreenRecordingUploadOptions {
...
@@ -74,6 +77,45 @@ public class ScreenRecordingUploadOptions {
return
this
;
return
this
;
}
}
/**
* Sets the form field name containing the binary payload in multipart/form-data
* requests.
*
* @since Appium 1.18.0
* @param fileFieldName The name of the form field containing the binary payload.
* "file" by default.
* @return self instance for chaining.
*/
public
ScreenRecordingUploadOptions
withFileFieldName
(
String
fileFieldName
)
{
this
.
fileFieldName
=
checkNotNull
(
fileFieldName
);
return
this
;
}
/**
* Sets additional form fields in multipart/form-data requests.
*
* @since Appium 1.18.0
* @param formFields form fields mapping. If any entry has the same key as
* `fileFieldName` then it is going to be ignored.
* @return self instance for chaining.
*/
public
ScreenRecordingUploadOptions
withFormFields
(
Map
<
String
,
Object
>
formFields
)
{
this
.
formFields
=
checkNotNull
(
formFields
);
return
this
;
}
/**
* Sets additional headers in multipart/form-data requests.
*
* @since Appium 1.18.0
* @param headers headers mapping.
* @return self instance for chaining.
*/
public
ScreenRecordingUploadOptions
withHeaders
(
Map
<
String
,
String
>
headers
)
{
this
.
headers
=
checkNotNull
(
headers
);
return
this
;
}
/**
/**
* Builds a map, which is ready to be passed to the subordinated
* Builds a map, which is ready to be passed to the subordinated
* Appium API.
* Appium API.
...
@@ -86,6 +128,9 @@ public class ScreenRecordingUploadOptions {
...
@@ -86,6 +128,9 @@ public class ScreenRecordingUploadOptions {
ofNullable
(
user
).
map
(
x
->
builder
.
put
(
"user"
,
x
));
ofNullable
(
user
).
map
(
x
->
builder
.
put
(
"user"
,
x
));
ofNullable
(
pass
).
map
(
x
->
builder
.
put
(
"pass"
,
x
));
ofNullable
(
pass
).
map
(
x
->
builder
.
put
(
"pass"
,
x
));
ofNullable
(
method
).
map
(
x
->
builder
.
put
(
"method"
,
x
));
ofNullable
(
method
).
map
(
x
->
builder
.
put
(
"method"
,
x
));
ofNullable
(
fileFieldName
).
map
(
x
->
builder
.
put
(
"fileFieldName"
,
x
));
ofNullable
(
formFields
).
map
(
x
->
builder
.
put
(
"formFields"
,
x
));
ofNullable
(
headers
).
map
(
x
->
builder
.
put
(
"headers"
,
x
));
return
builder
.
build
();
return
builder
.
build
();
}
}
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录