Skip to content

Commit

Permalink
Merge pull request #51 from deadmann/50-formurlencoded-model-send-emp…
Browse files Browse the repository at this point in the history
…ty-data

#50: Fix issue with FormUrlEncode, that request were empty
  • Loading branch information
deadmann authored May 13, 2024
2 parents 5c332a4 + b390922 commit 5b151ad
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 9 deletions.
2 changes: 1 addition & 1 deletion AdvancedRestHandler/AdvancedRestHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2329,7 +2329,7 @@ protected virtual HttpContent ObjectSerializer<TRequest>(TRequest req, RestHandl
#warning ...???

Check warning on line 2329 in AdvancedRestHandler/AdvancedRestHandler.cs

View workflow job for this annotation

GitHub Actions / build-arh-dotnet-core

#warning: '...???'

Check warning on line 2329 in AdvancedRestHandler/AdvancedRestHandler.cs

View workflow job for this annotation

GitHub Actions / build-arh-dotnet

#warning: '...???'

Check warning on line 2329 in AdvancedRestHandler/AdvancedRestHandler.cs

View workflow job for this annotation

GitHub Actions / build-test-dotnet

#warning: '...???'
var keyValueOnObject = ToKeyValue(req);
var keyValueRequest = new List<KeyValuePair<string, string>>();
foreach (KeyValuePair<string, string> p in keyValueRequest)
foreach (KeyValuePair<string, string> p in keyValueOnObject)
{
if (p.Value != null)
keyValueRequest.Add(new KeyValuePair<string, string>(p.Key, p.Value));
Expand Down
10 changes: 6 additions & 4 deletions AdvancedRestHandler/AdvancedRestHandler.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageLicenseFile>LICENSE.md</PackageLicenseFile>
<RootNamespace>Arh</RootNamespace>
<AssemblyVersion>1.6.0.0</AssemblyVersion>
<FileVersion>1.6.0.0</FileVersion>
<Version>1.6.0</Version>
<AssemblyVersion>1.7.0.0</AssemblyVersion>
<FileVersion>1.7.0.0</FileVersion>
<Version>1.7.0</Version>
<RepositoryUrl>https://github.com/deadmann/AdvancedRestHandler</RepositoryUrl>
<PackageReleaseNotes>
1.7.0
- Fix bug regarding FormUrlEncode were empty
1.6.0
- Add support for using custom SSL/TSL protocols
1.5.0
Expand All @@ -37,7 +39,7 @@
<Product>AdvancedRestHandler</Product>
<PackageId>AdvancedRestHandler</PackageId>
<AssemblyName>AdvancedRestHandler</AssemblyName>
<PackageVersion>1.6.0</PackageVersion>
<PackageVersion>1.7.0</PackageVersion>
<LangVersion>11</LangVersion>
</PropertyGroup>

Expand Down
10 changes: 10 additions & 0 deletions AdvancedRestHandler/AdvancedRestHandler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ A utility code that can be used to request Data from services...

This library is based on my experience and need of working in the past company, taking many services in. I could handle any request so far using it, and every time I felt it doesn't support my need, i tried to expand it.

[![NuGet](https://img.shields.io/badge/nuget-v1.6.0-blue)](https://www.nuget.org/packages/AdvancedRestHandler/)
[![NuGet](https://img.shields.io/badge/nuget-v1.7.0-blue)](https://www.nuget.org/packages/AdvancedRestHandler/)

First install the package using following commands, or download it manually from release section...

```powershell
Install-Package AdvancedRestHandler -Version 1.6.0
Install-Package AdvancedRestHandler -Version 1.7.0
```
or
```sh
dotnet add package AdvancedRestHandler --version 1.6.0
dotnet add package AdvancedRestHandler --version 1.7.0
```

Then you can use the library.
Expand Down
2 changes: 1 addition & 1 deletion _Docs/push nuget github package.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ $ dotnet nuget push "bin/Release/AdvancedRestHandler.1.0.0.nupkg" --source "gith
```
// OR (Based on nuget.config Configuration)
```bash
$ dotnet nuget push "bin/Release/AdvancedRestHandler.1.6.0.nupkg" --source "github" --api-key=[GH_AccessToken]
$ dotnet nuget push "bin/Release/AdvancedRestHandler.1.0.0.nupkg" --source "github" --api-key=[GH_AccessToken]
```
// OR (With %Key%)
```bash
Expand Down

0 comments on commit 5b151ad

Please sign in to comment.