mirror of
https://github.com/KevinWG/OSS.Tools.git
synced 2026-10-27 21:03:01 +08:00
优化方法名称
This commit is contained in:
@@ -142,15 +142,15 @@ namespace OSS.Tools.Http
|
||||
/// <param name="boundary"></param>
|
||||
private static void WriteMultipartFormData(Stream memory, OssHttpRequest request, string boundary)
|
||||
{
|
||||
if (request.FormParameters!=null)
|
||||
if (request.form_paras!=null)
|
||||
{
|
||||
foreach (var param in request.FormParameters)
|
||||
foreach (var param in request.form_paras)
|
||||
{
|
||||
WriteStringTo(memory, GetMultipartFormData(param, boundary));
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var file in request.FileParameters)
|
||||
foreach (var file in request.file_paras)
|
||||
{
|
||||
//文件头
|
||||
WriteStringTo(memory, GetMultipartFileHeader(file, boundary));
|
||||
@@ -208,9 +208,9 @@ namespace OSS.Tools.Http
|
||||
{
|
||||
var formstring = new StringBuilder();
|
||||
|
||||
if (request.FormParameters!=null)
|
||||
if (request.form_paras!=null)
|
||||
{
|
||||
foreach (var p in request.FormParameters)
|
||||
foreach (var p in request.form_paras)
|
||||
{
|
||||
if (formstring.Length > 1)
|
||||
formstring.Append("&");
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
<PackageProjectUrl>https://github.com/KevinWG/OSS.Tools</PackageProjectUrl>
|
||||
<RepositoryUrl>https://github.com/KevinWG/OSS.Tools</RepositoryUrl>
|
||||
<PackageIconUrl>http://img1.osscore.cn/static/oss_net.png</PackageIconUrl>
|
||||
<PackageReleaseNotes>添加扩展方法</PackageReleaseNotes>
|
||||
<PackageReleaseNotes>优化属性</PackageReleaseNotes>
|
||||
<Authors>OSSCore</Authors>
|
||||
<Company>OSSCore</Company>
|
||||
<Description>HTTP请求工具类库</Description>
|
||||
<Version>2.1.1</Version>
|
||||
<Version>2.1.2</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
|
||||
|
||||
@@ -69,13 +69,13 @@ namespace OSS.Tools.Http
|
||||
/// <summary>
|
||||
/// 文件参数列表
|
||||
/// </summary>
|
||||
public IReadOnlyList<FileParameter> FileParameters => _fileParameters ;
|
||||
public IReadOnlyList<FileParameter> file_paras => _fileParameters ;
|
||||
|
||||
/// <summary>
|
||||
/// 添加文件
|
||||
/// </summary>
|
||||
/// <param name="file"></param>
|
||||
public void AddFile(FileParameter file)
|
||||
public void AddFilePara(FileParameter file)
|
||||
{
|
||||
if (_fileParameters==null)
|
||||
{
|
||||
@@ -88,7 +88,7 @@ namespace OSS.Tools.Http
|
||||
/// <summary>
|
||||
/// 非文件参数列表
|
||||
/// </summary>
|
||||
public IReadOnlyList<FormParameter> FormParameters => _formParameters ;// 兼容老版本,取值时默认赋值
|
||||
public IReadOnlyList<FormParameter> form_paras => _formParameters ;// 兼容老版本,取值时默认赋值
|
||||
|
||||
/// <summary>
|
||||
/// 添加表单参数
|
||||
|
||||
Reference in New Issue
Block a user