pub struct HTTPTool { /* private fields */ }Expand description
HTTP request tool (GET/POST) with SSRF protection.
Implementations§
Source§impl HTTPTool
impl HTTPTool
Sourcepub fn with_timeout(timeout: Duration) -> Self
pub fn with_timeout(timeout: Duration) -> Self
Creates an HTTP tool with a custom timeout (SSRF protection enabled).
Sourcepub fn with_allow_private_ips(self, allow: bool) -> Self
pub fn with_allow_private_ips(self, allow: bool) -> Self
Allow requests to private/internal IP addresses (SSRF opt-in).
Trait Implementations§
Source§impl BaseTool for HTTPTool
impl BaseTool for HTTPTool
Source§fn description(&self) -> &str
fn description(&self) -> &str
Returns the tool description. Read more
Source§fn run<'life0, 'async_trait>(
&'life0 self,
input: String,
) -> Pin<Box<dyn Future<Output = Result<String, ToolError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn run<'life0, 'async_trait>(
&'life0 self,
input: String,
) -> Pin<Box<dyn Future<Output = Result<String, ToolError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Execute the tool (string version). Read more
Source§fn return_direct(&self) -> bool
fn return_direct(&self) -> bool
Whether to return result directly to user. Read more
Source§fn risk(&self) -> ToolRiskProfile
fn risk(&self) -> ToolRiskProfile
Declared Rule-of-Two risk profile (A2, v0.22.1). Read more
Auto Trait Implementations§
impl !RefUnwindSafe for HTTPTool
impl !UnwindSafe for HTTPTool
impl Freeze for HTTPTool
impl Send for HTTPTool
impl Sync for HTTPTool
impl Unpin for HTTPTool
impl UnsafeUnpin for HTTPTool
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more