Skip to content

Commit

Permalink
Fix the Multipart form again as it became a default for all POST calls
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeyzimarev committed Jul 4, 2023
1 parent 6d9cf85 commit 51f3c19
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
3 changes: 2 additions & 1 deletion benchmarks/RestSharp.Benchmarks/RestSharp.Benchmarks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@

<ItemGroup>
<PackageReference Include="AutoFixture" Version="4.18.0" />
<PackageReference Include="BenchmarkDotNet" Version="0.13.2" />
<PackageReference Include="BenchmarkDotNet" Version="0.13.5" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.6.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\RestSharp.Serializers.NewtonsoftJson\RestSharp.Serializers.NewtonsoftJson.csproj" />
Expand Down
6 changes: 3 additions & 3 deletions gen/SourceGenerator/SourceGenerator.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.4" PrivateAssets="All"/>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.5.0" PrivateAssets="All"/>
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.4" PrivateAssets="All" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.6.0" PrivateAssets="All" />
</ItemGroup>

<ItemGroup>
<None Include="$(OutputPath)\$(AssemblyName).dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false"/>
<None Include="$(OutputPath)\$(AssemblyName).dll" Pack="true" PackagePath="analyzers/dotnet/cs" Visible="false" />
</ItemGroup>
</Project>
3 changes: 1 addition & 2 deletions src/RestSharp/Request/RequestContent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ public HttpContent BuildContent() {
var bodyParametersExists = _request.TryGetBodyParameter(out var bodyParameter);
var filesExists = _request.Files.Any();

if (postParametersExists ||
_request.HasFiles() ||
if (_request.HasFiles() ||
BodyShouldBeMultipartForm(bodyParameter) ||
filesExists ||
_request.AlwaysMultipartFormData) {
Expand Down
2 changes: 1 addition & 1 deletion src/RestSharp/RestSharp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="System.Text.Json" Version="7.0.2" />
<PackageReference Include="System.Text.Json" Version="7.0.3" />
</ItemGroup>
<ItemGroup>
<None Remove="RestSharp.csproj.DotSettings" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<ItemGroup>
<PackageReference Include="HttpTracer" Version="2.1.1" />
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="6.0.15" />
<PackageReference Include="Polly" Version="7.2.3" />
<PackageReference Include="Polly" Version="7.2.4" />
<PackageReference Include="Xunit.Extensions.Logging" Version="1.1.0" />
</ItemGroup>
<ItemGroup>
Expand Down

0 comments on commit 51f3c19

Please sign in to comment.