dxFeed .Net API  7.1.0
dxFeed .Net API library intended to provide market data access for DX clients
com.dxfeed.io.URLInputStream Class Reference

Static Public Member Functions

static Uri ResolveUrl (string url)
 Resolves a given URL in the context of the current file. More...
 
static WebRequest OpenConnection (string url)
 Opens WebRequest for a specified URL. This method resolves specified URL first, for a proper support of file name. Use CheckConnectionResponseCode(WebResponse) after establishing connection to ensure that it was Ok. This is a shortcut for OpenConnection(ResolveURL(URL), null, null). More...
 
static WebRequest OpenConnection (string url, string user, string password)
 Opens WebRequest for a specified URL with a specified basic user and password credentials. Use CheckConnectionResponseCode(WebResponse) after establishing connection to ensure that it was Ok. Credentials are used only when both user and password are non-null and non-empty. Specified credentials take precedence over authentication information that is supplied to this method as part of URL user info like "http://user:password@host:port/path/file". More...
 
static WebRequest OpenConnection (Uri url, string user, string password)
 Opens WebRequest for a specified URL with a specified basic user and password credentials. Use CheckConnectionResponseCode(WebResponse) after establishing connection to ensure that it was Ok. Credentials are used only when both user and password are non-null and non-empty. Specified credentials take precedence over authentication information that is supplied to this method as part of URL user info like "http://user:password@host:port/path/file". More...
 
static WebRequest OpenConnection (string url, string token)
 Opens WebRequest for a specified URL with a specified bearer token. Use CheckConnectionResponseCode(WebResponse) after establishing connection to ensure that it was Ok. More...
 
static WebRequest OpenConnection (Uri url, string token)
 Opens WebRequest for a specified URL with a specified bearer token. Use CheckConnectionResponseCode(WebResponse) after establishing connection to ensure that it was Ok. More...
 
static void CheckConnectionResponseCode (WebResponse webResponse)
 Checks connection response code and throws IOException if it is not Ok. More...
 

Member Function Documentation

◆ CheckConnectionResponseCode()

static void com.dxfeed.io.URLInputStream.CheckConnectionResponseCode ( WebResponse  webResponse)
inlinestatic

Checks connection response code and throws IOException if it is not Ok.

Parameters
webResponseResponse from the server.
Exceptions
IOExceptionIf an I/O error occurs.

◆ OpenConnection() [1/5]

static WebRequest com.dxfeed.io.URLInputStream.OpenConnection ( string  url)
inlinestatic

Opens WebRequest for a specified URL. This method resolves specified URL first, for a proper support of file name. Use CheckConnectionResponseCode(WebResponse) after establishing connection to ensure that it was Ok. This is a shortcut for OpenConnection(ResolveURL(URL), null, null).

Parameters
urlUrl the URL.
Returns
A new WebRequest object.
Exceptions
NotSupportedExceptionThe request scheme specified in requestUri is not registered.
ArgumentNullExceptionRequestUri is null.
System.Security.SecurityExceptionThe caller does not have permission to connect to the requested URI or a URI that the request is redirected to.

◆ OpenConnection() [2/5]

static WebRequest com.dxfeed.io.URLInputStream.OpenConnection ( string  url,
string  user,
string  password 
)
inlinestatic

Opens WebRequest for a specified URL with a specified basic user and password credentials. Use CheckConnectionResponseCode(WebResponse) after establishing connection to ensure that it was Ok. Credentials are used only when both user and password are non-null and non-empty. Specified credentials take precedence over authentication information that is supplied to this method as part of URL user info like "http://user:password@host:port/path/file".

Parameters
urlUrl the URL string.
userThe user name (may be null).
passwordThe password (may be null).
Returns
A new WebRequest object.
Exceptions
NotSupportedExceptionThe request scheme specified in requestUri is not registered.
ArgumentNullExceptionRequestUri is null.
System.Security.SecurityExceptionThe caller does not have permission to connect to the requested URI or a URI that the request is redirected to.

◆ OpenConnection() [3/5]

static WebRequest com.dxfeed.io.URLInputStream.OpenConnection ( Uri  url,
string  user,
string  password 
)
inlinestatic

Opens WebRequest for a specified URL with a specified basic user and password credentials. Use CheckConnectionResponseCode(WebResponse) after establishing connection to ensure that it was Ok. Credentials are used only when both user and password are non-null and non-empty. Specified credentials take precedence over authentication information that is supplied to this method as part of URL user info like "http://user:password@host:port/path/file".

Parameters
urlUrl the URL.
userThe user name (may be null).
passwordThe password (may be null).
Returns
A new WebRequest object.
Exceptions
NotSupportedExceptionThe request scheme specified in requestUri is not registered.
ArgumentNullExceptionRequestUri is null.
System.Security.SecurityExceptionThe caller does not have permission to connect to the requested URI or a URI that the request is redirected to.

◆ OpenConnection() [4/5]

static WebRequest com.dxfeed.io.URLInputStream.OpenConnection ( string  url,
string  token 
)
inlinestatic

Opens WebRequest for a specified URL with a specified bearer token. Use CheckConnectionResponseCode(WebResponse) after establishing connection to ensure that it was Ok.

Parameters
urlUrl the URL string.
tokenThe bearer authorization's token
Returns
A new WebRequest object.
Exceptions
NotSupportedExceptionThe request scheme specified in requestUri is not registered.
ArgumentNullExceptionRequestUri is null or token is null
System.Security.SecurityExceptionThe caller does not have permission to connect to the requested URI or a URI that the request is redirected to.

◆ OpenConnection() [5/5]

static WebRequest com.dxfeed.io.URLInputStream.OpenConnection ( Uri  url,
string  token 
)
inlinestatic

Opens WebRequest for a specified URL with a specified bearer token. Use CheckConnectionResponseCode(WebResponse) after establishing connection to ensure that it was Ok.

Parameters
urlUrl the URL.
tokenThe bearer authorization's token
Returns
A new WebRequest object.
Exceptions
NotSupportedExceptionThe request scheme specified in requestUri is not registered.
ArgumentNullExceptionRequestUri is null or token is null
System.Security.SecurityExceptionThe caller does not have permission to connect to the requested URI or a URI that the request is redirected to.

◆ ResolveUrl()

static Uri com.dxfeed.io.URLInputStream.ResolveUrl ( string  url)
inlinestatic

Resolves a given URL in the context of the current file.

Parameters
urlUrl, relative, or absolute file name.
Returns
Resolved url.
Exceptions
ArgumentNullException
UriFormatException

The documentation for this class was generated from the following file: