AS AgentScopeAPI 手册 / API Reference

RemoteHttpClient

public class RemoteHttpClient
源码Source io/agentscope/runtime/sandbox/manager/remote/RemoteHttpClient.java:35–189

远程 HTTP 客户端,封装与远端服务的连接和调用。位于 io.agentscope.runtime.sandbox.manager.remote 包。核心成员包括 makeRequest、getBaseUrl、isConfigured、RemoteHttpClient。

HTTP client for making remote calls to SandboxService server. This client handles the communication with the remote SandboxService service.

构造器摘要Constructor Summary

构造器Constructor说明Description
public RemoteHttpClient(String baseUrl, String bearerToken)
初始化 `RemoteHttpClient` 实例。
Creates a new instance.

方法摘要Method Summary

方法Method说明Description
public Object makeRequest(RequestMethod method, String endpoint, Map<String, Object> data, String successKey)
执行 `makeRequest` 方法。
Make an HTTP request to the remote server
public String getBaseUrl()
获取基类 URL。
Returns the base url.
public boolean isConfigured()
判断是否 `isConfigured`。
Returns whether the configured.

构造器详情Constructor Detail

RemoteHttpClient

public RemoteHttpClient(String baseUrl, String bearerToken)

初始化 RemoteHttpClient 实例。

Creates a new instance.

参数Parameters
名称Name类型Type说明Description
baseUrlString基类 URL(类型 `String`)。The base url.
bearerTokenStringbearer 令牌(类型 `String`)。The bearer token.
源码Source io/agentscope/runtime/sandbox/manager/remote/RemoteHttpClient.java:43–48

方法详情Method Detail

makeRequest

public Object makeRequest(RequestMethod method, String endpoint, Map<String, Object> data, String successKey)

执行 makeRequest 方法。

Make an HTTP request to the remote server

参数Parameters
名称Name类型Type说明Description
methodRequestMethod方法(类型 `RequestMethod`)。HTTP method (GET, POST, DELETE, etc.)
endpointString端点地址(类型 `String`)。Endpoint path (e.g., "/create", "/release")
dataMap<String, Object>数据(类型 `Map`)。Request data
successKeyString成功键(类型 `String`)。Key in response JSON to extract data from
返回Returns Object
返回对象。Response data
源码Source io/agentscope/runtime/sandbox/manager/remote/RemoteHttpClient.java:59–109

getBaseUrl

public String getBaseUrl()

获取基类 URL。

Returns the base url.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/runtime/sandbox/manager/remote/RemoteHttpClient.java:182–184

isConfigured

public boolean isConfigured()

判断是否 isConfigured。

Returns whether the configured.

返回Returns boolean
返回布尔值,表示判断结果。Returns a boolean result.
源码Source io/agentscope/runtime/sandbox/manager/remote/RemoteHttpClient.java:186–188
基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.