C# Class ServiceStack.Text.WebRequestExtensions

Exibir arquivo Open project: 7digital/ServiceStack.Text

Public Methods

Method Description
DeleteFromUrl ( this url, string acceptContentType = "*/*", Action requestFilter = null, Action responseFilter = null ) : string
GetBytesFromUrl ( this url, string acceptContentType = "*/*", Action requestFilter = null, Action responseFilter = null ) : byte[]
GetJsonFromUrl ( this url, Action requestFilter = null, Action responseFilter = null ) : string
GetResponseStatus ( this url ) : HttpStatusCode?
GetStatus ( this ex ) : HttpStatusCode?
GetStringFromUrl ( this url, string acceptContentType = "*/*", Action requestFilter = null, Action responseFilter = null ) : string
GetXmlFromUrl ( this url, Action requestFilter = null, Action responseFilter = null ) : string
HasStatus ( this webEx, HttpStatusCode statusCode ) : bool
HeadFromUrl ( this url, string acceptContentType = "*/*", Action requestFilter = null, Action responseFilter = null ) : string
IsAny300 ( this ex ) : bool
IsAny400 ( this ex ) : bool
IsAny500 ( this ex ) : bool
IsBadRequest ( this ex ) : bool
IsForbidden ( this ex ) : bool
IsInternalServerError ( this ex ) : bool
IsNotFound ( this ex ) : bool
IsUnauthorized ( this ex ) : bool
OptionsFromUrl ( this url, string acceptContentType = "*/*", Action requestFilter = null, Action responseFilter = null ) : string
PostBytesToUrl ( this url, byte requestBody = null, string contentType = null, string acceptContentType = "*/*", Action requestFilter = null, Action responseFilter = null ) : byte[]
PostJsonToUrl ( this url, object data, Action requestFilter = null, Action responseFilter = null ) : string
PostJsonToUrl ( this url, string json, Action requestFilter = null, Action responseFilter = null ) : string
PostStringToUrl ( this url, string requestBody = null, string contentType = null, string acceptContentType = "*/*", Action requestFilter = null, Action responseFilter = null ) : string
PostToUrl ( this url, object formData = null, string acceptContentType = "*/*", Action requestFilter = null, Action responseFilter = null ) : string
PostToUrl ( this url, string formData = null, string acceptContentType = "*/*", Action requestFilter = null, Action responseFilter = null ) : string
PostXmlToUrl ( this url, object data, Action requestFilter = null, Action responseFilter = null ) : string
PostXmlToUrl ( this url, string xml, Action requestFilter = null, Action responseFilter = null ) : string
PutBytesToUrl ( this url, byte requestBody = null, string contentType = null, string acceptContentType = "*/*", Action requestFilter = null, Action responseFilter = null ) : byte[]
PutJsonToUrl ( this url, object data, Action requestFilter = null, Action responseFilter = null ) : string
PutJsonToUrl ( this url, string json, Action requestFilter = null, Action responseFilter = null ) : string
PutStringToUrl ( this url, string requestBody = null, string contentType = null, string acceptContentType = "*/*", Action requestFilter = null, Action responseFilter = null ) : string
PutToUrl ( this url, object formData = null, string acceptContentType = "*/*", Action requestFilter = null, Action responseFilter = null ) : string
PutToUrl ( this url, string formData = null, string acceptContentType = "*/*", Action requestFilter = null, Action responseFilter = null ) : string
PutXmlToUrl ( this url, object data, Action requestFilter = null, Action responseFilter = null ) : string
PutXmlToUrl ( this url, string xml, Action requestFilter = null, Action responseFilter = null ) : string
SendBytesToUrl ( this url, string method = null, byte requestBody = null, string contentType = null, string acceptContentType = "*/*", Action requestFilter = null, Action responseFilter = null ) : byte[]
SendStringToUrl ( this url, string method = null, string requestBody = null, string contentType = null, string acceptContentType = "*/*", Action requestFilter = null, Action responseFilter = null ) : string
ToFormUrlEncoded ( this queryParams ) : string

Method Details

DeleteFromUrl() public static method

public static DeleteFromUrl ( this url, string acceptContentType = "*/*", Action requestFilter = null, Action responseFilter = null ) : string
url this
acceptContentType string
requestFilter Action
responseFilter Action
return string

GetBytesFromUrl() public static method

public static GetBytesFromUrl ( this url, string acceptContentType = "*/*", Action requestFilter = null, Action responseFilter = null ) : byte[]
url this
acceptContentType string
requestFilter Action
responseFilter Action
return byte[]

GetJsonFromUrl() public static method

public static GetJsonFromUrl ( this url, Action requestFilter = null, Action responseFilter = null ) : string
url this
requestFilter Action
responseFilter Action
return string

GetResponseStatus() public static method

public static GetResponseStatus ( this url ) : HttpStatusCode?
url this
return HttpStatusCode?

GetStatus() public static method

public static GetStatus ( this ex ) : HttpStatusCode?
ex this
return HttpStatusCode?

GetStringFromUrl() public static method

public static GetStringFromUrl ( this url, string acceptContentType = "*/*", Action requestFilter = null, Action responseFilter = null ) : string
url this
acceptContentType string
requestFilter Action
responseFilter Action
return string

GetXmlFromUrl() public static method

public static GetXmlFromUrl ( this url, Action requestFilter = null, Action responseFilter = null ) : string
url this
requestFilter Action
responseFilter Action
return string

HasStatus() public static method

public static HasStatus ( this webEx, HttpStatusCode statusCode ) : bool
webEx this
statusCode HttpStatusCode
return bool

HeadFromUrl() public static method

public static HeadFromUrl ( this url, string acceptContentType = "*/*", Action requestFilter = null, Action responseFilter = null ) : string
url this
acceptContentType string
requestFilter Action
responseFilter Action
return string

IsAny300() public static method

public static IsAny300 ( this ex ) : bool
ex this
return bool

IsAny400() public static method

public static IsAny400 ( this ex ) : bool
ex this
return bool

IsAny500() public static method

public static IsAny500 ( this ex ) : bool
ex this
return bool

IsBadRequest() public static method

public static IsBadRequest ( this ex ) : bool
ex this
return bool

IsForbidden() public static method

public static IsForbidden ( this ex ) : bool
ex this
return bool

IsInternalServerError() public static method

public static IsInternalServerError ( this ex ) : bool
ex this
return bool

IsNotFound() public static method

public static IsNotFound ( this ex ) : bool
ex this
return bool

IsUnauthorized() public static method

public static IsUnauthorized ( this ex ) : bool
ex this
return bool

OptionsFromUrl() public static method

public static OptionsFromUrl ( this url, string acceptContentType = "*/*", Action requestFilter = null, Action responseFilter = null ) : string
url this
acceptContentType string
requestFilter Action
responseFilter Action
return string

PostBytesToUrl() public static method

public static PostBytesToUrl ( this url, byte requestBody = null, string contentType = null, string acceptContentType = "*/*", Action requestFilter = null, Action responseFilter = null ) : byte[]
url this
requestBody byte
contentType string
acceptContentType string
requestFilter Action
responseFilter Action
return byte[]

PostJsonToUrl() public static method

public static PostJsonToUrl ( this url, object data, Action requestFilter = null, Action responseFilter = null ) : string
url this
data object
requestFilter Action
responseFilter Action
return string

PostJsonToUrl() public static method

public static PostJsonToUrl ( this url, string json, Action requestFilter = null, Action responseFilter = null ) : string
url this
json string
requestFilter Action
responseFilter Action
return string

PostStringToUrl() public static method

public static PostStringToUrl ( this url, string requestBody = null, string contentType = null, string acceptContentType = "*/*", Action requestFilter = null, Action responseFilter = null ) : string
url this
requestBody string
contentType string
acceptContentType string
requestFilter Action
responseFilter Action
return string

PostToUrl() public static method

public static PostToUrl ( this url, object formData = null, string acceptContentType = "*/*", Action requestFilter = null, Action responseFilter = null ) : string
url this
formData object
acceptContentType string
requestFilter Action
responseFilter Action
return string

PostToUrl() public static method

public static PostToUrl ( this url, string formData = null, string acceptContentType = "*/*", Action requestFilter = null, Action responseFilter = null ) : string
url this
formData string
acceptContentType string
requestFilter Action
responseFilter Action
return string

PostXmlToUrl() public static method

public static PostXmlToUrl ( this url, object data, Action requestFilter = null, Action responseFilter = null ) : string
url this
data object
requestFilter Action
responseFilter Action
return string

PostXmlToUrl() public static method

public static PostXmlToUrl ( this url, string xml, Action requestFilter = null, Action responseFilter = null ) : string
url this
xml string
requestFilter Action
responseFilter Action
return string

PutBytesToUrl() public static method

public static PutBytesToUrl ( this url, byte requestBody = null, string contentType = null, string acceptContentType = "*/*", Action requestFilter = null, Action responseFilter = null ) : byte[]
url this
requestBody byte
contentType string
acceptContentType string
requestFilter Action
responseFilter Action
return byte[]

PutJsonToUrl() public static method

public static PutJsonToUrl ( this url, object data, Action requestFilter = null, Action responseFilter = null ) : string
url this
data object
requestFilter Action
responseFilter Action
return string

PutJsonToUrl() public static method

public static PutJsonToUrl ( this url, string json, Action requestFilter = null, Action responseFilter = null ) : string
url this
json string
requestFilter Action
responseFilter Action
return string

PutStringToUrl() public static method

public static PutStringToUrl ( this url, string requestBody = null, string contentType = null, string acceptContentType = "*/*", Action requestFilter = null, Action responseFilter = null ) : string
url this
requestBody string
contentType string
acceptContentType string
requestFilter Action
responseFilter Action
return string

PutToUrl() public static method

public static PutToUrl ( this url, object formData = null, string acceptContentType = "*/*", Action requestFilter = null, Action responseFilter = null ) : string
url this
formData object
acceptContentType string
requestFilter Action
responseFilter Action
return string

PutToUrl() public static method

public static PutToUrl ( this url, string formData = null, string acceptContentType = "*/*", Action requestFilter = null, Action responseFilter = null ) : string
url this
formData string
acceptContentType string
requestFilter Action
responseFilter Action
return string

PutXmlToUrl() public static method

public static PutXmlToUrl ( this url, object data, Action requestFilter = null, Action responseFilter = null ) : string
url this
data object
requestFilter Action
responseFilter Action
return string

PutXmlToUrl() public static method

public static PutXmlToUrl ( this url, string xml, Action requestFilter = null, Action responseFilter = null ) : string
url this
xml string
requestFilter Action
responseFilter Action
return string

SendBytesToUrl() public static method

public static SendBytesToUrl ( this url, string method = null, byte requestBody = null, string contentType = null, string acceptContentType = "*/*", Action requestFilter = null, Action responseFilter = null ) : byte[]
url this
method string
requestBody byte
contentType string
acceptContentType string
requestFilter Action
responseFilter Action
return byte[]

SendStringToUrl() public static method

public static SendStringToUrl ( this url, string method = null, string requestBody = null, string contentType = null, string acceptContentType = "*/*", Action requestFilter = null, Action responseFilter = null ) : string
url this
method string
requestBody string
contentType string
acceptContentType string
requestFilter Action
responseFilter Action
return string

ToFormUrlEncoded() public static method

public static ToFormUrlEncoded ( this queryParams ) : string
queryParams this
return string