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:

Constructors

AnthropicClient.new(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) Future<void>
Make a DELETE request
getJson(String endpoint) Future<Map<String, dynamic>>
Make a GET request and return JSON response
getRaw(String endpoint) 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) Future<Map<String, dynamic>>
Make a POST request with form data
postJson(String endpoint, Map<String, dynamic> data) Future<Map<String, dynamic>>
Make a POST request and return JSON response
postStreamRaw(String endpoint, Map<String, dynamic> data) 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