mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-04-08 03:00:28 -04:00
Update block docs for: helpers/http.md
This commit is contained in:
33
docs/content/platform/blocks/update/helpers/http.md
Normal file
33
docs/content/platform/blocks/update/helpers/http.md
Normal file
@@ -0,0 +1,33 @@
|
||||
|
||||
## HTTP Request Handler
|
||||
|
||||
### What it is
|
||||
A utility component that simplifies the process of making HTTP GET requests to web services and APIs.
|
||||
|
||||
### What it does
|
||||
Fetches data from specified web addresses (URLs) and returns the response in either JSON format or plain text, depending on your needs.
|
||||
|
||||
### How it works
|
||||
When given a web address, this component sends a request to that address, optionally including any specified headers. It then processes the response and returns it in your preferred format (either structured JSON data or plain text).
|
||||
|
||||
### Inputs
|
||||
- URL: The web address you want to fetch data from
|
||||
- Headers: Optional additional information to send with the request (such as authentication tokens or content preferences)
|
||||
- JSON Flag: A simple yes/no option that determines whether the response should be processed as JSON data
|
||||
|
||||
### Outputs
|
||||
- When JSON is requested: Structured data that can be easily processed
|
||||
- When JSON is not requested: Plain text content from the web address
|
||||
|
||||
### Possible use cases
|
||||
- Fetching weather data from a weather service API
|
||||
- Retrieving user profile information from a social media platform
|
||||
- Downloading content from web services
|
||||
- Checking the status of external services
|
||||
- Integrating with third-party data providers
|
||||
|
||||
### Best Practices
|
||||
- Always provide valid URLs
|
||||
- Include appropriate headers when accessing secured services
|
||||
- Use JSON output when working with API responses
|
||||
- Handle potential connection errors appropriately
|
||||
Reference in New Issue
Block a user