AnthropicClient class
Core Anthropic HTTP client shared across all capability modules
This class provides the foundational HTTP functionality that all Anthropic capability implementations can use. It handles:
- Authentication and headers
- Request/response processing
- Error handling
- SSE stream parsing
- Provider-specific configurations
API Documentation:
- API Overview: https://docs.anthropic.com/en/api/overview
- Authentication: https://docs.anthropic.com/en/api/overview#authentication
- Versioning: https://docs.anthropic.com/en/api/versioning
- Beta Features: https://docs.anthropic.com/en/api/overview#beta-features
Constructors
- AnthropicClient(AnthropicConfig config)
Properties
- config → AnthropicConfig
- 
  
  final
- dio ↔ Dio
- 
  
  latefinal
- hashCode → int
- 
  The hash code for this object.
  no setterinherited
- logger → Logger
- 
  
  final
- runtimeType → Type
- 
  A representation of the runtime type of the object.
  no setterinherited
Methods
- 
  delete(String endpoint, {CancelToken? cancelToken}) → Future< void> 
- Make a DELETE request
- 
  getJson(String endpoint, {CancelToken? cancelToken}) → Future< Map< String, dynamic> >
- Make a GET request and return JSON response
- 
  getRaw(String endpoint, {CancelToken? cancelToken}) → Future< List< int> >
- Make a GET request and return raw bytes
- 
  noSuchMethod(Invocation invocation) → dynamic 
- 
  Invoked when a nonexistent method or property is accessed.
  inherited
- 
  postForm(String endpoint, FormData formData, {CancelToken? cancelToken}) → Future< Map< String, dynamic> >
- Make a POST request with form data
- 
  postJson(String endpoint, Map< String, dynamic> data, {CancelToken? cancelToken}) → Future<Map< String, dynamic> >
- Make a POST request and return JSON response
- 
  postStreamRaw(String endpoint, Map< String, dynamic> data, {CancelToken? cancelToken}) → Stream<String> 
- Make a POST request and return raw stream for SSE
- 
  toString() → String 
- 
  A string representation of this object.
  inherited
Operators
- 
  operator ==(Object other) → bool 
- 
  The equality operator.
  inherited