C# Class Universe.Framework.Utilities.WebUtils

显示文件 Open project: Virtual-Universe/Virtual-Universe

Public Methods

Method Description
DeleteFromService ( string url ) : string

PUT JSON-encoded data to a web service that returns LLSD or JSON data

DeleteFromService ( string url ) : void

DELETE JSON-encoded data to a web service

GetFromService ( string url ) : string

GET JSON-encoded data to a web service that returns LLSD or JSON data

GetOSDMap ( string data, bool doLogMessages ) : OSDMap
GetPreferredImageTypes ( string accept ) : string[]

Takes the value of an Accept header and returns the preferred types ordered by q value (if it exists). Example input: image/jpg;q=0.7, image/png;q=0.8, image/jp2 Example output: ["jp2", "png", "jpg"] NOTE: This doesn't handle the semantics of *'s...

PostToService ( string url, byte data ) : byte[]
PostToService ( string url, OSDMap data ) : string

POST URL-encoded form data to a web service that returns LLSD or JSON data

PutToService ( string url, OSDMap data ) : string

PUT JSON-encoded data to a web service that returns LLSD or JSON data

ServiceOSDRequest ( string url, byte buffer, string method, int timeout ) : Task
ServiceOSDRequest ( string url, byte buffer, string method, int timeout ) : byte[]

Method Details

DeleteFromService() public static method

PUT JSON-encoded data to a web service that returns LLSD or JSON data
public static DeleteFromService ( string url ) : string
url string
return string

DeleteFromService() public static method

DELETE JSON-encoded data to a web service
public static DeleteFromService ( string url ) : void
url string
return void

GetFromService() public static method

GET JSON-encoded data to a web service that returns LLSD or JSON data
public static GetFromService ( string url ) : string
url string
return string

GetOSDMap() public static method

public static GetOSDMap ( string data, bool doLogMessages ) : OSDMap
data string
doLogMessages bool
return OSDMap

GetPreferredImageTypes() public static method

Takes the value of an Accept header and returns the preferred types ordered by q value (if it exists). Example input: image/jpg;q=0.7, image/png;q=0.8, image/jp2 Example output: ["jp2", "png", "jpg"] NOTE: This doesn't handle the semantics of *'s...
public static GetPreferredImageTypes ( string accept ) : string[]
accept string
return string[]

PostToService() public static method

public static PostToService ( string url, byte data ) : byte[]
url string
data byte
return byte[]

PostToService() public static method

POST URL-encoded form data to a web service that returns LLSD or JSON data
public static PostToService ( string url, OSDMap data ) : string
url string
data OSDMap
return string

PutToService() public static method

PUT JSON-encoded data to a web service that returns LLSD or JSON data
public static PutToService ( string url, OSDMap data ) : string
url string
data OSDMap
return string

ServiceOSDRequest() public static method

public static ServiceOSDRequest ( string url, byte buffer, string method, int timeout ) : Task
url string
buffer byte
method string
timeout int
return Task

ServiceOSDRequest() public static method

public static ServiceOSDRequest ( string url, byte buffer, string method, int timeout ) : byte[]
url string
buffer byte
method string
timeout int
return byte[]