http_get
Execute HTTP GET requests to retrieve web content by specifying URL, optional query parameters, and custom headers, returning full HTTP responses including status, headers, and body.
Instructions
执行 HTTP GET 请求。
Args:
url (str): 请求的目标 URL。
query (Dict[str, str | int | float], optional): 可选参数,查询参数键值对。参数值会自动转换为字符串,并且会拼接到 url 里。
例如: {'key1': 'value1', 'key2': 2}会被转换为key1=value1&key2=2,并拼接到 url。
headers (Dict[str, str], optional): 可选参数,自定义的 http 请求头。
Returns:
str: 标准HTTP响应格式的字符串,包含状态行、响应头和响应体。
Input Schema
Name | Required | Description | Default |
---|---|---|---|
headers | No | ||
query | No | ||
url | Yes |
Input Schema (JSON Schema)
{
"properties": {
"headers": {
"anyOf": [
{
"additionalProperties": {
"type": "string"
},
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Headers"
},
"query": {
"anyOf": [
{
"additionalProperties": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
},
{
"type": "number"
}
]
},
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Query"
},
"url": {
"title": "Url",
"type": "string"
}
},
"required": [
"url"
],
"title": "http_getArguments",
"type": "object"
}