reflection1921/WinHTTPSharp

Using HttpWebRequest in .NET like WinHttp style.

★ 0Forks 0C#GitHub ↗Compare

README

WinHttpSharp

The library allows that you can use HttpWebRequest class like WinHttp style using C# and VB.NET.

Simple Usage

C#:

static void main(string[] args)
{
	WinHttpRequest whttp = new WinHttpRequest();

	whttp.Open("GET", "https://www.google.co.kr", true);
	whttp.Send().GetAwaiter().GetResult();

	Console.WriteLine(whttp.ResponseText);
}

VB.NET:

Sub Main()
	Dim wHttp As WinHttpRequest = New WinHttpRequest

	wHttp.Open("GET", "https://www.google.co.kr")
	wHttp.Send()

	Console.WriteLine(wHttp.ResponseText)
End Sub

Implemented Functions, Properties, Events

Functions

Name Return Type Implemented
Open void Yes
Send void Yes
SetRequestHeader void Yes
GetResponseHeader string Yes
GetResponseHeaders string Yes
Abort void Yes
SetAutoLogonPolicy void No
SetClientCertificate void No
SetProxy void No
SetTimeouts void No
WaitForResponse bool No

Properties

Name Return Type Implemented
Responsebody byte[] Yes
ResponseStream Stream Yes
ResponseText string Yes
Status int Yes
StatusText string Yes
Option object No

Events

Name Implemented
OnError No
OnResponseDataAvailable No
OnResponseStart No
OnResponseFinished Yes

Contributors

reflection1921

Issues