HttpClientToCurl 2.0.3

There is a newer version of this package available.
See the version list below for details.
dotnet add package HttpClientToCurl --version 2.0.3
                    
NuGet\Install-Package HttpClientToCurl -Version 2.0.3
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="HttpClientToCurl" Version="2.0.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="HttpClientToCurl" Version="2.0.3" />
                    
Directory.Packages.props
<PackageReference Include="HttpClientToCurl" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add HttpClientToCurl --version 2.0.3
                    
#r "nuget: HttpClientToCurl, 2.0.3"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=HttpClientToCurl&version=2.0.3
                    
Install HttpClientToCurl as a Cake Addin
#tool nuget:?package=HttpClientToCurl&version=2.0.3
                    
Install HttpClientToCurl as a Cake Tool

This extension will help you see whatever is set in HttpClient as a curl script.
Sometimes we may want to connect with an external service provider but when calling we come across many errors and we should spend a lot of time resolving errors. It happened to me many times;
for example, the external service provider expects properties a request to be sent to it in the form of The Camel case but we send data to it in the form of The Pascal Case. after much investigation, we have realized this issue. Or it is possible we forget to send one Property or a Header or we made a mistake in filling in the value of a Header or Property
and many issues like these, which we spent a lot of time resolving.
this extension makes our work very easy.
Before sending data to the service provider, this extension can show us exactly what we send it. (in the form of a curl in the console or in the file).
After getting the curl, we can now call it in the terminal or import it in the Postman and check with the documents provided by the provider.

You have 3 ways to see script results:

1- Write in the console:

    httpClient.GenerateCurlInConsole(httpRequestMessage, null);

2- Write in a file:

    httpClient.GenerateCurlInFile(httpRequestMessage, null);

3- Put into a variable:

   string script = httpClient.GenerateCurlInString(httpRequestMessage, null);

Read more about this extension:
https://medium.com/@amin.golmahalle/how-to-generate-curl-script-of-the-httpclient-in-net-c539da7c6588

Source Address:
https://github.com/amingolmahalle/HttpClientToCurlGenerator

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.1

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on HttpClientToCurl:

Package Downloads
SomeGenericDev.RestSharpToCurl

A tiny and hacky library that uses reflection and DelegatingHandlers to generate a cURL script out of RestSharp's requests.

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on HttpClientToCurl:

Repository Stars
PlexRipper/PlexRipper
A cross-platform Plex media downloader that seamlessly adds media from other Plex servers to your own!
Version Downloads Last updated
2.0.6 352,975 3/13/2024
2.0.5 32,625 1/19/2024
2.0.3 10,149 12/20/2023
2.0.2 84,109 10/1/2023
2.0.1 5,541 8/13/2023
2.0.0 18,756 5/25/2023
1.9.0 21,417 3/13/2023
1.8.9 563 3/1/2023
1.8.8 2,967 2/9/2023
1.8.7 587 2/7/2023
1.8.6 541 2/6/2023
1.8.5 581 1/25/2023
1.8.3 899 11/23/2022
1.8.2 623 10/31/2022
1.8.1 712 9/19/2022
1.8.0 742 9/19/2022
1.7.0 758 9/13/2022
1.6.0 680 9/13/2022
1.5.0 734 9/11/2022
1.4.0 696 9/10/2022
1.3.0 678 9/6/2022
1.2.0 697 9/5/2022
1.1.0 675 9/5/2022
1.0.0 1,213 9/1/2022

This extension will help you see whatever is set in HttpClient as a curl script.
Sometimes we may want to connect with an external service provider but when calling we come across many errors and we should spend a lot of time resolving errors. It happened to me many times;
for example, the external service provider expects properties a request to be sent to it in the form of The Camel case but we send data to it in the form of The Pascal Case. after much investigation, we have realized this issue. Or it is possible we forget to send one Property or a Header or we made a mistake in filling in the value of a Header or Property
and many issues like these, which we spent a lot of time resolving.
this extension makes our work very easy.
Before sending data to the service provider, this extension can show us exactly what we send it. (in the form of a curl in the console or in the file).
After getting the curl, we can now call it in the terminal or import it in the Postman and check with the documents provided by the provider.

You have 3 ways to see script results:

1- Write in the console:

    httpClient.GenerateCurlInConsole(httpRequestMessage, null);

2- Write in a file:

    httpClient.GenerateCurlInFile(httpRequestMessage, null);

3- Put into a variable:

   string script = httpClient.GenerateCurlInString(httpRequestMessage, null);

Read more about this extension:
https://medium.com/@amin.golmahalle/how-to-generate-curl-script-of-the-httpclient-in-net-c539da7c6588

Source Address:
https://github.com/amingolmahalle/HttpClientToCurlGenerator