C# 클래스 SMS20Api.SMS20.HttpHelper

Utility class for simplify http parsing
파일 보기 프로젝트 열기: ForjaOMF/OMF-WinMobileSDK

공개 메소드들

메소드 설명
ExecuteRequest ( string url, string contentType, string method, string body, Header optionalHeaders, bool autoRedirect ) : HttpWebResponse

Performs a HTTP request

ExtractValue ( string data, string from, string to ) : string

Extract text value between the two provided strings

ParseCookie ( string cookie ) : string
ReadBody ( HttpWebResponse response ) : byte[]

Read received body

ReadBody ( HttpWebResponse response, System encoding ) : string

Read received body

ReadBodyAsXml ( HttpWebResponse response ) : XmlDocument
Save2disk ( string filename, byte data ) : void

메소드 상세

ExecuteRequest() 공개 정적인 메소드

Performs a HTTP request
public static ExecuteRequest ( string url, string contentType, string method, string body, Header optionalHeaders, bool autoRedirect ) : HttpWebResponse
url string Target URL
contentType string Content-Type Header
method string HTTP Method (POST/GET)
body string string data to send when method is POST
optionalHeaders Header Array of optional headers needed by the request
autoRedirect bool Allows automatically performig autoredirect when the server invokes it
리턴 System.Net.HttpWebResponse

ExtractValue() 공개 정적인 메소드

Extract text value between the two provided strings
public static ExtractValue ( string data, string from, string to ) : string
data string source string
from string Start string chunk
to string End string chunk
리턴 string

ParseCookie() 공개 정적인 메소드

public static ParseCookie ( string cookie ) : string
cookie string
리턴 string

ReadBody() 공개 정적인 메소드

Read received body
public static ReadBody ( HttpWebResponse response ) : byte[]
response System.Net.HttpWebResponse Http response received from the server
리턴 byte[]

ReadBody() 공개 정적인 메소드

Read received body
public static ReadBody ( HttpWebResponse response, System encoding ) : string
response System.Net.HttpWebResponse Http response received from the server
encoding System Content-Encoding used to decode the buffer
리턴 string

ReadBodyAsXml() 공개 정적인 메소드

public static ReadBodyAsXml ( HttpWebResponse response ) : XmlDocument
response System.Net.HttpWebResponse
리턴 System.Xml.XmlDocument

Save2disk() 공개 정적인 메소드

public static Save2disk ( string filename, byte data ) : void
filename string
data byte
리턴 void