QuantumGhost/dify-plugin-http-tool

★ 0Forks 0PythonGitHub ↗Compare

README

HTTP Request

Author: quantumghost Version: 0.0.1 Type: tool

This software was vibe-generated. It may contain issues. If you run into problems, please open an issue.

Description

This is a general-purpose HTTP Request escape hatch plugin.

It does not wrap any business semantics, provide provider-level defaults, or add an authentication abstraction. You must explicitly fill in the target URL, headers, query, body, timeout, and other parameters for each call.

Parameters

  • method: HTTP method
  • url: Full URL, which may already include query parameters
  • query: Optional JSON object. Keys with the same name override query parameters already present in url
  • headers: Optional JSON object for request headers
  • content_type: none, json, form_urlencoded, text
  • body: Request body. In json and form_urlencoded mode, this must be a valid JSON string
  • timeout_ms: Timeout in milliseconds
  • follow_redirects: Whether to follow redirects
  • verify_ssl: Whether to verify the TLS certificate

Query Merge Rule

The query string embedded in url is parsed first, then keys from the query parameter override keys with the same name, and finally the final URL is rebuilt.

For example:

  • url = https://example.com/api?a=1&b=2
  • query = {"a":"9","c":"3"}

The request will finally be sent to:

  • https://example.com/api?a=9&b=2&c=3

Output

The tool outputs two messages:

  • A text summary: METHOD final_url -> status reason (elapsed ms)
  • A structured JSON result

The result JSON includes:

  • request.method
  • request.url
  • request.final_url
  • request.headers
  • request.query
  • request.body_mode
  • response.status_code
  • response.reason_phrase
  • response.headers
  • response.encoding
  • response.elapsed_ms
  • response.body_text
  • response.body_json
  • response.body_truncated

If the request fails, it also returns:

  • error.type
  • error.message

Limits

  • Multipart file upload is not supported
  • SSE, WebSocket, and streaming responses are not supported
  • No domain allowlist or private network restriction is enforced
  • No authentication abstraction is provided; if authentication is needed, pass it directly in headers

Contributors

QuantumGhost

Issues