ProxyAPIConfig class

Configuration for routing HTTP requests through a proxy API.

This class defines how to route web scraping requests through a proxy API. The proxy API acts as an intermediary that forwards requests to the target URL and returns the response, which can help bypass rate limiting, geo-restrictions, or other access controls.

Example usage:

final proxyConfig = ProxyAPIConfig(
  apiUrl: 'https://api.proxyservice.com/scrape',
  targetUrlParameter: 'url',
);

// This will make a request to:
// https://api.proxyservice.com/scrape?url=https://example.com

Constructors

ProxyAPIConfig({required Uri apiUrl, required String targetUrlParameter})
Creates a new proxy API configuration.
const
ProxyAPIConfig.fromJson(String json)
factory
ProxyAPIConfig.fromMap(Map<String, dynamic> map)
factory

Properties

apiUrl → Uri
The base URL of the proxy API that will handle the requests.
final
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
targetUrlParameter → String
The query parameter name used by the proxy API to specify the target URL.
final

Methods

generateUrl(Uri url) → Uri
Returns a new URL with the target URL parameter added.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → String
toMap() → Map<String, dynamic>
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited