Class HttpBrowsingClient
HTTP Client.
Inheritance
Inherited Members
Namespace: Gee.External.Browsing.Clients.Http
Assembly: Gee.External.Browsing.dll
Syntax
public sealed class HttpBrowsingClient : IBrowsingClient, IDisposable
Constructors
HttpBrowsingClient(String)
Create a Browsing Client.
Declaration
public HttpBrowsingClient(string apiKey)
Parameters
Type | Name | Description |
---|---|---|
System.String | apiKey | A Google Safe Browsing API key to authenticate to the Google Safe Browsing API with. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown if |
Methods
Dispose()
Dispose Object.
Declaration
public void Dispose()
FindFullHashesAsync(FullHashRequest, CancellationToken)
Find Full Hashes Asynchronously.
Declaration
public Task<FullHashResponse> FindFullHashesAsync(FullHashRequest request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
FullHashRequest | request | |
System.Threading.CancellationToken | cancellationToken | A cancellation token to cancel the asynchronous operation with. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<FullHashResponse> |
Exceptions
Type | Condition |
---|---|
BrowsingClientException | Thrown if an error communicating with the Google Safe Browsing API occurs. |
System.ArgumentNullException | Thrown if |
System.ObjectDisposedException | Thrown if the object is disposed. |
System.OperationCanceledException | Thrown if the asynchronous operation is cancelled. |
System.TimeoutException | Thrown if communication with the Google Safe Browsing API times out. |
GetThreatListDescriptorsAsync(CancellationToken)
Get Threat List Descriptors Asynchronously.
Declaration
public Task<IEnumerable<ThreatListDescriptor>> GetThreatListDescriptorsAsync(CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System.Threading.CancellationToken | cancellationToken | A cancellation token to cancel the asynchronous operation with. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<ThreatListDescriptor>> | A collection of ThreatListDescriptor. |
Exceptions
Type | Condition |
---|---|
BrowsingClientException | Thrown if an error communicating with the Google Safe Browsing API occurs. |
System.ObjectDisposedException | Thrown if the object is disposed. |
System.OperationCanceledException | Thrown if the asynchronous operation is cancelled. |
System.TimeoutException | Thrown if communication with the Google Safe Browsing API times out. |
GetThreatListUpdatesAsync(ThreatListUpdateRequest, CancellationToken)
Get Threat List Updates Asynchronously.
Declaration
public Task<ThreatListUpdateResponse> GetThreatListUpdatesAsync(ThreatListUpdateRequest request, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
ThreatListUpdateRequest | request | |
System.Threading.CancellationToken | cancellationToken | A cancellation token to cancel the asynchronous operation with. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<ThreatListUpdateResponse> |
Exceptions
Type | Condition |
---|---|
BrowsingClientException | Thrown if an error communicating with the Google Safe Browsing API occurs. |
System.ArgumentNullException | Thrown if |
System.ObjectDisposedException | Thrown if the object is disposed. |
System.OperationCanceledException | Thrown if the asynchronous operation is cancelled. |
System.TimeoutException | Thrown if communication with the Google Safe Browsing API times out. |