SalQuickHTTP
Namespace: PPJ.Runtime.Windows.QO
Assembly: PPJ.Runtime.50 (5.0.0.0)
Exposes HTTP retrieval and HTML extraction through a Quick Objects control.
- C#
- VB.NET
public class SalQuickHTTP : SalCustomControl
Public Class SalQuickHTTP
Inherits SalCustomControl
Example:
using PPJ.Runtime.Windows.QO;
var control = new SalQuickHTTP();
control.SetSource("https://example.com", "<html><title>Example</title></html>");
Constructors
SalQuickHTTP()
Initializes the HTTP compatibility control.
Properties
AppName
String: Gets or sets the application-name compatibility value. (Default: "")
SalQuickHTTP uses it as the user agent when its client is first created. SalQuickFTP stores it without applying it.
HttpClient
SalHttpClient: Gets the lazily created HTTP client.
First access captures AppName as the user agent, sends QOM_ControlCreate, and attaches status-message forwarding.
Source
String: Gets or sets the cached HTML source used by extraction methods. (Default: "")
Title
String: Gets or sets the stored title compatibility value. (Default: "")
Url
SalString: Gets or sets the address associated with the cached source. (Default: "")
Assigning this property does not retrieve a page.
WindowsClassName
String: Gets the fixed native window-class name compatibility value. (Default: "")
Returns an empty string; assignments throw InvalidOperationException.
WindowsDLLName
String: Gets the fixed native library name compatibility value. (Default: "")
Returns an empty string; assignments throw InvalidOperationException.
WindowsExStyle
Int32: Gets the fixed extended native window style compatibility value. (Default: 0)
Returns zero; assignments throw InvalidOperationException.
WindowsStyle
Int32: Gets the fixed native window style compatibility value. (Default: 0)
Returns zero; assignments throw InvalidOperationException.
Methods
EnumImages(sImages)
Extracts image-source attributes from cached HTML.
| Parameter | Type | Description |
|---|---|---|
| sImages | SalArray<SalString> | Receives extracted image addresses. |
Returns: SalNumber. The number of extracted image sources.
Uses simple tag scanning rather than a full HTML parser.
EnumLinks(sLinks, sText)
Extracts link destinations and simple labels from cached HTML.
| Parameter | Type | Description |
|---|---|---|
| sLinks | SalArray<SalString> | Receives extracted link destinations. |
| sText | SalArray<SalString> | Receives corresponding labels. |
Returns: SalNumber. The number of extracted links.
Uses simple tag scanning rather than a full HTML parser.
GetPageTitle(sHttpSource, sHttpTitle)
Extracts text between title tags in supplied HTML.
| Parameter | Type | Description |
|---|---|---|
| sHttpSource | SalString | The HTML source. |
| sHttpTitle | SalString | Receives the title when found. |
Returns: SalNumber. The title length, or zero if no complete title is found.
The output is unchanged if no complete title is found.
GetSource(sHttpUrl, sHttpSource)
Retrieves an HTTP page and updates Source, Url, and the output string.
| Parameter | Type | Description |
|---|---|---|
| sHttpUrl | SalString | The HTTP resource address. |
| sHttpSource | SalString | Receives the retrieved HTML source on success. |
Returns: SalNumber. Zero on completion; the negated client error code when a client exception is handled. Cancellation with code zero also returns zero.
The output is unchanged on a handled client error.
GetSourceSize(sHttpUrl)
Requests a resource and reads its reported content length.
| Parameter | Type | Description |
|---|---|---|
| sHttpUrl | SalString | The HTTP resource address. |
Returns: SalNumber. The response length, -1 when unknown, or the negated client error code.
Performs a normal request rather than HEAD and does not apply the proxy property.
SetBoundsCore(x, y, width, height, specified)
Applies the requested position while fixing the control size at 33 by 33 pixels.
| Parameter | Type | Description |
|---|---|---|
| x | Int32 | The left coordinate. |
| y | Int32 | The top coordinate. |
| width | Int32 | The requested width; replaced with 33. |
| height | Int32 | The requested height; replaced with 33. |
| specified | BoundsSpecified | The bounds components being changed. |
SetProxy(sProxyName, nProxyPort)
Sets the proxy used by HTTP source retrieval.
| Parameter | Type | Description |
|---|---|---|
| sProxyName | SalString | The proxy address. |
| nProxyPort | SalNumber | The proxy port; appended only when positive. |
Returns: SalNumber. Zero on completion; the negated client error code when a client exception is handled. Cancellation with code zero also returns zero.
A positive port is appended to the supplied address. Source-size queries do not apply this proxy.
SetSource(sHttpUrl, sHttpSource)
Stores an address and HTML source without making a request.
| Parameter | Type | Description |
|---|---|---|
| sHttpUrl | SalString | The HTTP resource address. |
| sHttpSource | SalString | The HTML source. |
Returns: SalNumber. One.
Implements
| Name | Description |
|---|---|
| ISalWindow | Exposes SAL message dispatch and runtime metadata for child controls, forms, dialogs, and MDI windows. |