Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -120,3 +120,4 @@ Generated_Code #added for RIA/Silverlight projects
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
/.vs
554 changes: 39 additions & 515 deletions CurlSharp.sln

Large diffs are not rendered by default.

19 changes: 0 additions & 19 deletions CurlSharp/Curl.cs
Original file line number Diff line number Diff line change
@@ -1,22 +1,3 @@
/***************************************************************************
*
* CurlS#arp
*
* Copyright (c) 2013-2017 Dr. Masroor Ehsan ([email protected])
* Portions copyright (c) 2004, 2005 Jeff Phillips ([email protected])
*
* This software is licensed as described in the file LICENSE, which you
* should have received as part of this distribution.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of this Software, and permit persons to whom the Software is
* furnished to do so, under the terms of the LICENSE file.
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
* ANY KIND, either express or implied.
*
**************************************************************************/

using System;
using System.Runtime.InteropServices;

Expand Down
19 changes: 0 additions & 19 deletions CurlSharp/CurlEasy.cs
Original file line number Diff line number Diff line change
@@ -1,22 +1,3 @@
/***************************************************************************
*
* CurlS#arp
*
* Copyright (c) 2013-2017 Dr. Masroor Ehsan ([email protected])
* Portions copyright (c) 2004, 2005 Jeff Phillips ([email protected])
*
* This software is licensed as described in the file LICENSE, which you
* should have received as part of this distribution.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of this Software, and permit persons to whom the Software is
* furnished to do so, under the terms of the LICENSE file.
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
* ANY KIND, either express or implied.
*
**************************************************************************/

using System;
using System.Runtime.InteropServices;

Expand Down
19 changes: 0 additions & 19 deletions CurlSharp/CurlHttpMultiPartForm.cs
Original file line number Diff line number Diff line change
@@ -1,22 +1,3 @@
/***************************************************************************
*
* CurlS#arp
*
* Copyright (c) 2013-2017 Dr. Masroor Ehsan ([email protected])
* Portions copyright (c) 2004, 2005 Jeff Phillips ([email protected])
*
* This software is licensed as described in the file LICENSE, which you
* should have received as part of this distribution.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of this Software, and permit persons to whom the Software is
* furnished to do so, under the terms of the LICENSE file.
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
* ANY KIND, either express or implied.
*
**************************************************************************/

using System;
using System.Runtime.InteropServices;

Expand Down
19 changes: 0 additions & 19 deletions CurlSharp/CurlMulti.cs
Original file line number Diff line number Diff line change
@@ -1,22 +1,3 @@
/***************************************************************************
*
* CurlS#arp
*
* Copyright (c) 2013-2017 Dr. Masroor Ehsan ([email protected])
* Portions copyright (c) 2004, 2005 Jeff Phillips ([email protected])
*
* This software is licensed as described in the file LICENSE, which you
* should have received as part of this distribution.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of this Software, and permit persons to whom the Software is
* furnished to do so, under the terms of the LICENSE file.
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
* ANY KIND, either express or implied.
*
**************************************************************************/

using System;
using System.Collections;
using System.Runtime.InteropServices;
Expand Down
19 changes: 0 additions & 19 deletions CurlSharp/CurlMultiInfo.cs
Original file line number Diff line number Diff line change
@@ -1,22 +1,3 @@
/***************************************************************************
*
* CurlS#arp
*
* Copyright (c) 2013-2017 Dr. Masroor Ehsan ([email protected])
* Portions copyright (c) 2004, 2005 Jeff Phillips ([email protected])
*
* This software is licensed as described in the file LICENSE, which you
* should have received as part of this distribution.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of this Software, and permit persons to whom the Software is
* furnished to do so, under the terms of the LICENSE file.
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
* ANY KIND, either express or implied.
*
**************************************************************************/

namespace CurlSharp
{
/// <summary>
Expand Down
19 changes: 0 additions & 19 deletions CurlSharp/CurlShare.cs
Original file line number Diff line number Diff line change
@@ -1,22 +1,3 @@
/***************************************************************************
*
* CurlS#arp
*
* Copyright (c) 2013 Dr. Masroor Ehsan ([email protected])
* Portions copyright (c) 2004, 2005 Jeff Phillips ([email protected])
*
* This software is licensed as described in the file LICENSE, which you
* should have received as part of this distribution.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of this Software, and permit persons to whom the Software is
* furnished to do so, under the terms of the LICENSE file.
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
* ANY KIND, either express or implied.
*
**************************************************************************/

using System;
using System.Runtime.InteropServices;

Expand Down
45 changes: 36 additions & 9 deletions CurlSharp/CurlSharp.csproj
Original file line number Diff line number Diff line change
@@ -1,17 +1,44 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net461;netstandard1.5</TargetFrameworks>
</PropertyGroup>

<PropertyGroup>
<TargetFrameworks>net8.0</TargetFrameworks>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<PackageId>CurlSharp</PackageId>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="System.Collections.NonGeneric" Version="4.3.0" />
<PackageReference Include="System.Runtime.InteropServices.RuntimeInformation" Version="4.3.0" />
</ItemGroup>
<None Update="libs\amd64\curl-ca-bundle.crt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="libs\amd64\libcrypto-1_1-x64.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="libs\amd64\libcurl.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="libs\amd64\libssh2.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="libs\amd64\libssl-1_1-x64.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="libs\i386\curl-ca-bundle.crt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="libs\i386\libcrypto-1_1.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="libs\i386\libcurl.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="libs\i386\libcurlshim.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="libs\i386\libssh2.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="libs\i386\libssl-1_1.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>

</Project>
19 changes: 0 additions & 19 deletions CurlSharp/CurlSlist.cs
Original file line number Diff line number Diff line change
@@ -1,22 +1,3 @@
/***************************************************************************
*
* CurlS#arp
*
* Copyright (c) 2013-2017 Dr. Masroor Ehsan ([email protected])
* Portions copyright (c) 2004, 2005 Jeff Phillips ([email protected])
*
* This software is licensed as described in the file LICENSE, which you
* should have received as part of this distribution.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of this Software, and permit persons to whom the Software is
* furnished to do so, under the terms of the LICENSE file.
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
* ANY KIND, either express or implied.
*
**************************************************************************/

using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
Expand Down
19 changes: 0 additions & 19 deletions CurlSharp/CurlSslContext.cs
Original file line number Diff line number Diff line change
@@ -1,22 +1,3 @@
/***************************************************************************
*
* CurlS#arp
*
* Copyright (c) 2013-2017 Dr. Masroor Ehsan ([email protected])
* Portions copyright (c) 2004, 2005 Jeff Phillips ([email protected])
*
* This software is licensed as described in the file LICENSE, which you
* should have received as part of this distribution.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of this Software, and permit persons to whom the Software is
* furnished to do so, under the terms of the LICENSE file.
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
* ANY KIND, either express or implied.
*
**************************************************************************/

using System;

namespace CurlSharp
Expand Down
19 changes: 0 additions & 19 deletions CurlSharp/CurlVersionInfoData.cs
Original file line number Diff line number Diff line change
@@ -1,22 +1,3 @@
/***************************************************************************
*
* CurlS#arp
*
* Copyright (c) 2013-2017 Dr. Masroor Ehsan ([email protected])
* Portions copyright (c) 2004, 2005 Jeff Phillips ([email protected])
*
* This software is licensed as described in the file LICENSE, which you
* should have received as part of this distribution.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of this Software, and permit persons to whom the Software is
* furnished to do so, under the terms of the LICENSE file.
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
* ANY KIND, either express or implied.
*
**************************************************************************/

using System;
using System.Runtime.InteropServices;

Expand Down
25 changes: 3 additions & 22 deletions CurlSharp/NativeMethods.cs
Original file line number Diff line number Diff line change
@@ -1,23 +1,3 @@
/***************************************************************************
*
* CurlS#arp
*
* Copyright (c) 2013-2017 Dr. Masroor Ehsan ([email protected])
* Portions copyright (c) 2004, 2005 Jeff Phillips ([email protected])
* Portions copyright (c) 2017 Katelyn Gigante (https://github.com/silasary)
*
* This software is licensed as described in the file LICENSE, which you
* should have received as part of this distribution.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of this Software, and permit persons to whom the Software is
* furnished to do so, under the terms of the LICENSE file.
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
* ANY KIND, either express or implied.
*
**************************************************************************/

//#define USE_LIBCURLSHIM

using System;
Expand Down Expand Up @@ -51,13 +31,14 @@ static NativeMethods()
switch (RuntimeInformation.OSArchitecture)
{
case Architecture.X64:
SetDllDirectory(Path.Combine(AssemblyDirectory, LIB_DIR_WIN64));
SetDllDirectory(Path.Combine(AssemblyDirectory,"libs", LIB_DIR_WIN64));
break;
case Architecture.X86:
SetDllDirectory(Path.Combine(AssemblyDirectory, LIB_DIR_WIN32));
SetDllDirectory(Path.Combine(AssemblyDirectory, "libs", LIB_DIR_WIN32));
break;
}
}

#if USE_LIBCURLSHIM
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
throw new InvalidOperationException("Can not run on other platform than Win NET");
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
14 changes: 14 additions & 0 deletions Examples/Examples.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\CurlSharp\CurlSharp.csproj" />
</ItemGroup>

</Project>
39 changes: 39 additions & 0 deletions Examples/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
using CurlSharp;
using System.Text;

namespace Examples
{
internal class Program
{
static void Main(string[] args)
{
Curl.GlobalInit(CurlInitFlag.All);

using (var easy = new CurlEasy())
{
easy.AutoReferer = true;
easy.FollowLocation = true;
easy.Url = "https://ipakyulibank.uz";
easy.WriteFunction = OnWriteData;

// HTTP/2 please
easy.HttpVersion = CurlHttpVersion.Http2_0;

// skip SSL verification during debugging
easy.SslVerifyPeer = false;
easy.SslVerifyhost = false;

easy.Perform();
}

Console.WriteLine("DONE!");
}

public static int OnWriteData(byte[] buf, int size, int nmemb, object data)
{
Console.Write(Encoding.UTF8.GetString(buf));

return size * nmemb;
}
}
}
27 changes: 0 additions & 27 deletions LICENSE

This file was deleted.

Loading