HttpClientToCurl 2.0.2

There is a newer version of this package available.
See the version list below for details.
dotnet add package HttpClientToCurl --version 2.0.2                
NuGet\Install-Package HttpClientToCurl -Version 2.0.2                
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.2" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add HttpClientToCurl --version 2.0.2                
#r "nuget: HttpClientToCurl, 2.0.2"                
#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.
// Install HttpClientToCurl as a Cake Addin
#addin nuget:?package=HttpClientToCurl&version=2.0.2

// Install HttpClientToCurl as a Cake Tool
#tool nuget:?package=HttpClientToCurl&version=2.0.2                

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. 
.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

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.0.6 126,203 3/13/2024
2.0.5 24,863 1/19/2024
2.0.3 8,714 12/20/2023
2.0.2 75,225 10/1/2023
2.0.1 5,115 8/13/2023
2.0.0 16,518 5/25/2023
1.9.0 18,956 3/13/2023
1.8.9 531 3/1/2023
1.8.8 2,919 2/9/2023
1.8.7 563 2/7/2023
1.8.6 518 2/6/2023
1.8.5 557 1/25/2023
1.8.3 861 11/23/2022
1.8.2 594 10/31/2022
1.8.1 683 9/19/2022
1.8.0 701 9/19/2022
1.7.0 725 9/13/2022
1.6.0 656 9/13/2022
1.5.0 698 9/11/2022
1.4.0 666 9/10/2022
1.3.0 651 9/6/2022
1.2.0 667 9/5/2022
1.1.0 640 9/5/2022
1.0.0 929 9/1/2022

2.0.2