Table of Contents

Class CPHttpBaseClass

Namespace
Contensive.BaseClasses
Assembly
CPBase.dll

Helper methods to perform common http requests

public abstract class CPHttpBaseClass
Inheritance
CPHttpBaseClass
Inherited Members

Properties

CdnFilePathPrefix

The prefix used with database file field types to create a file link. Use to create links used on the website. For links in resources outside the websie like email, RSS, etc use FilePathAbsolute(). For example, the file record may contain cctablename\imagefilename\000000000001\myPhoto.jpg, this method might return /files/mysite/ if the file system is local (files on the webserver), or it might return https://myCdnSource.com/publicfiles/ if the application is setup for remote files, and this is the cdn

public abstract string CdnFilePathPrefix { get; }

Property Value

string

CdnFilePathPrefixAbsolute

The prefix added to database file-field types to create a file link. Use to create links in resources outside the website like email and rss. For example, the file record may contain cctablename\imagefilename\000000000001\myPhoto.jpg, this method might return https://www.mywebsite.com/files/mysite/ if the filesystem is local (file on the webserver), or it might return https://myCdnSource.com/publicfiles/ if the application is setup for remote files, and this is the cdn. For local filesystems, the protocol is always https, and the domain comes from the domain in the server's config file, or can be overridden with the site property ""

public abstract string CdnFilePathPrefixAbsolute { get; }

Property Value

string

WebAddressProtocolDomain

The prefered protocol and domain to be used to call the website (or application server). This value returns https:// + the primary domain name configured in the serverr appconfig.json This can be overridden with the site property webAddressProtocolDomain on the Preferences page

public abstract string WebAddressProtocolDomain { get; }

Property Value

string

Methods

Get(string)

Get url to a string. Use file objects to save to file

public abstract string Get(string url)

Parameters

url string

Returns

string

Post(string)

post entity to a url. Use file objects to save to file

public abstract string Post(string url)

Parameters

url string

Returns

string

Post(string, NameValueCollection)

Post key/values to a url. Use file objects to save to file

public abstract string Post(string url, NameValueCollection requestArguments)

Parameters

url string
requestArguments NameValueCollection

Returns

string