Show / Hide Table of Contents

Class BaseEndpoint

Abstract Base class for HTTP endpoints.

Inheritance
System.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
public abstract class BaseEndpoint : IConfigurationSerializable

Constructors

| Improve this Doc View Source

BaseEndpoint()

Creates a new Base Endpoint.

Declaration
protected BaseEndpoint()
| Improve this Doc View Source

BaseEndpoint(Uri)

Creates a new Base Endpoint.

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

Endpoint URI.

Properties

| Improve this Doc 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
System.Net.NetworkCredential
| Improve this Doc 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.

| Improve this Doc View Source

Proxy

Gets/Sets a Proxy Server to be used.

Declaration
public IWebProxy Proxy { get; set; }
Property Value
Type Description
System.Net.IWebProxy
| Improve this Doc View Source

ProxyCredentials

Gets/Sets Credentials to be used for Proxy Server.

Declaration
public ICredentials ProxyCredentials { get; set; }
Property Value
Type Description
System.Net.ICredentials
| Improve this Doc 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 System.Int32.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.

| Improve this Doc View Source

Uri

Gets the Endpoints URI.

Declaration
public Uri Uri { get; }
Property Value
Type Description
System.Uri
| Improve this Doc 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
System.Boolean
| Improve this Doc 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

| Improve this Doc 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
System.Net.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.

| Improve this Doc 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
System.Net.HttpWebRequest httpRequest

HTTP Request.

| Improve this Doc View Source

ClearCredentials()

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

Declaration
public void ClearCredentials()
| Improve this Doc View Source

ClearProxy()

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

Declaration
public void ClearProxy()
| Improve this Doc View Source

ClearProxyCredentials()

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

Declaration
public void ClearProxyCredentials()
| Improve this Doc 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.

| Improve this Doc 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.

| Improve this Doc 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.

| Improve this Doc 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.

| Improve this Doc View Source

SetProxy(Uri)

Sets a Proxy Server to be used.

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

Proxy Address.

| Improve this Doc 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.

| Improve this Doc 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.

Implements

IConfigurationSerializable

Extension Methods

Extensions.ToSafeString(object)
Extensions.AsEnumerable<T>(T)
  • Improve this Doc
  • 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, string)
    • SetCredentials(string, string)
    • SetProxy(string)
    • SetProxy(Uri)
    • SetProxyCredentials(string, string, string)
    • SetProxyCredentials(string, string)
  • Implements
  • Extension Methods
Back to top Generated by DocFX