Show / Hide Table of Contents

Class BaseEndpoint

Abstract Base class for HTTP endpoints.

Inheritance
object
BaseEndpoint
SparqlRemoteEndpoint
SparqlRemoteUpdateEndpoint
Implements
IConfigurationSerializable
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: VDS.RDF
Assembly: dotNetRdf.dll
Syntax
[Obsolete("This class is obsolete and will be removed in a future release.")]
public abstract class BaseEndpoint : IConfigurationSerializable

Constructors

| Edit this page View Source

BaseEndpoint()

Creates a new Base Endpoint.

Declaration
protected BaseEndpoint()
| Edit this page View Source

BaseEndpoint(Uri)

Creates a new Base Endpoint.

Declaration
protected BaseEndpoint(Uri endpointUri)
Parameters
Type Name Description
Uri endpointUri

Endpoint URI.

Properties

| Edit this page View Source

Credentials

Gets the HTTP authentication credentials to be used to access the endpoint.

Declaration
public NetworkCredential Credentials { get; set; }
Property Value
Type Description
NetworkCredential
| Edit this page View Source

HttpMode

Gets/Sets the HTTP Mode used for requests.

Declaration
public virtual string HttpMode { get; set; }
Property Value
Type Description
string
Remarks

This property defaults to the value AUTO. in AUTO mode GET will be used unless the total length of query parameters exceeeds 2048 characters or the query contains non-ASCII characters, and POST will be used for longer queries or where the query contains non-ASCII characters.

Only AUTO, GET and POST are permitted - implementations may override this property if they wish to support more methods.

| Edit this page View Source

Proxy

Gets/Sets a Proxy Server to be used.

Declaration
public IWebProxy Proxy { get; set; }
Property Value
Type Description
IWebProxy
| Edit this page View Source

ProxyCredentials

Gets/Sets Credentials to be used for Proxy Server.

Declaration
public ICredentials ProxyCredentials { get; set; }
Property Value
Type Description
ICredentials
| Edit this page View Source

Timeout

Gets/Sets the HTTP Timeouts used specified in milliseconds.

Declaration
public int Timeout { get; set; }
Property Value
Type Description
int
Remarks

Defaults to 30 Seconds (i.e. the default value is 30,000).

It is important to understand that this timeout only applies to the HTTP request portions of any operation performed and that the timeout may apply more than once if a POST operation is used since the timeout applies separately to obtaining the request stream to POST the request and obtaining the response stream. Also the timeout does not in any way apply to subsequent work that may be carried out before the operation can return so if you need a hard timeout you should manage that yourself.

When set to a zero/negative value then the standard .Net timeout of 100 seconds will apply, use MaxValue if you want the maximum possible timeout i.e. if you expect to launch extremely long running operations.

Not supported under Silverlight, Windows Phone and Portable Class Library builds.

| Edit this page View Source

Uri

Gets the Endpoints URI.

Declaration
public Uri Uri { get; }
Property Value
Type Description
Uri
| Edit this page View Source

UseCredentialsForProxy

Controls whether the Credentials set with the SetCredentials() method or the Credentialsare also used for a Proxy (if used).

Declaration
public bool UseCredentialsForProxy { get; set; }
Property Value
Type Description
bool
| Edit this page View Source

UserAgent

Gets/Sets the user agent string to pass in the request header.

Declaration
public string UserAgent { get; set; }
Property Value
Type Description
string
Remarks

Defaults to null, which will not set the header.

Methods

| Edit this page View Source

ApplyCustomRequestOptions(HttpWebRequest)

Method which may be overridden in derived classes to add any additional custom request options/headers to the request.

Declaration
protected virtual void ApplyCustomRequestOptions(HttpWebRequest httpRequest)
Parameters
Type Name Description
HttpWebRequest httpRequest

HTTP Request.

Remarks

This is called at the end of ApplyRequestOptions(HttpWebRequest) so can also be used to override that methods default behaviour.

| Edit this page View Source

ApplyRequestOptions(HttpWebRequest)

Applies generic request options (timeout, authorization and proxy server) to a request.

Declaration
protected void ApplyRequestOptions(HttpWebRequest httpRequest)
Parameters
Type Name Description
HttpWebRequest httpRequest

HTTP Request.

| Edit this page View Source

ClearCredentials()

Clears any in-use credentials so subsequent requests will not use HTTP authentication.

Declaration
public void ClearCredentials()
| Edit this page View Source

ClearProxy()

Clears any in-use credentials so subsequent requests will not use a proxy server.

Declaration
public void ClearProxy()
| Edit this page View Source

ClearProxyCredentials()

Clears the in-use proxy credentials so subsequent requests still use the proxy server but without credentials.

Declaration
public void ClearProxyCredentials()
| Edit this page View Source

SerializeConfiguration(ConfigurationSerializationContext)

Serializes the endpoints Credential and Proxy information.

Declaration
public virtual void SerializeConfiguration(ConfigurationSerializationContext context)
Parameters
Type Name Description
ConfigurationSerializationContext context

Configuration Serialization Context.

| Edit this page View Source

SetCredentials(string, string)

Sets the HTTP Digest authentication credentials to be used.

Declaration
public void SetCredentials(string username, string password)
Parameters
Type Name Description
string username

Username.

string password

Password.

| Edit this page View Source

SetCredentials(string, string, string)

Sets the HTTP Digest authentication credentials to be used.

Declaration
public void SetCredentials(string username, string password, string domain)
Parameters
Type Name Description
string username

Username.

string password

Password.

string domain

Domain.

| Edit this page View Source

SetProxy(string)

Sets a Proxy Server to be used.

Declaration
public void SetProxy(string address)
Parameters
Type Name Description
string address

Proxy Address.

| Edit this page View Source

SetProxy(Uri)

Sets a Proxy Server to be used.

Declaration
public void SetProxy(Uri address)
Parameters
Type Name Description
Uri address

Proxy Address.

| Edit this page View Source

SetProxyCredentials(string, string)

Sets Credentials to be used for Proxy Server.

Declaration
public void SetProxyCredentials(string username, string password)
Parameters
Type Name Description
string username

Username.

string password

Password.

| Edit this page View Source

SetProxyCredentials(string, string, string)

Sets Credentials to be used for Proxy Server.

Declaration
public void SetProxyCredentials(string username, string password, string domain)
Parameters
Type Name Description
string username

Username.

string password

Password.

string domain

Domain.

Implements

IConfigurationSerializable

Extension Methods

Extensions.ToSafeString(object)
Extensions.AsEnumerable<T>(T)
  • Edit this page
  • View Source
In this article
  • Constructors
    • BaseEndpoint()
    • BaseEndpoint(Uri)
  • Properties
    • Credentials
    • HttpMode
    • Proxy
    • ProxyCredentials
    • Timeout
    • Uri
    • UseCredentialsForProxy
    • UserAgent
  • Methods
    • ApplyCustomRequestOptions(HttpWebRequest)
    • ApplyRequestOptions(HttpWebRequest)
    • ClearCredentials()
    • ClearProxy()
    • ClearProxyCredentials()
    • SerializeConfiguration(ConfigurationSerializationContext)
    • SetCredentials(string, string)
    • SetCredentials(string, string, string)
    • SetProxy(string)
    • SetProxy(Uri)
    • SetProxyCredentials(string, string)
    • SetProxyCredentials(string, string, string)
  • Implements
  • Extension Methods
Back to top Generated by DocFX