mirror of
https://github.com/danielmiessler/Fabric.git
synced 2026-01-10 06:48:04 -05:00
### CHANGES - Introduce `cmd` directory for all main application binaries. - Move all Go packages into the `internal` directory. - Rename the `restapi` package to `server` for clarity. - Consolidate patterns and strategies into a new `data` directory. - Group all auxiliary scripts into a new `scripts` directory. - Move all documentation and images into a `docs` directory. - Update all Go import paths to reflect the new structure. - Adjust CI/CD workflows and build commands for new layout.
828 B
828 B
Fetch Plugin Tests
Simple test file for validating fetch plugin functionality.
Basic Fetch Operations
Raw Content:
{{plugin:fetch:get:https://raw.githubusercontent.com/user/repo/main/README.md}}
JSON API:
{{plugin:fetch:get:https://api.example.com/data.json}}
Error Cases
These should produce appropriate error messages:
Invalid Operation:
{{plugin:fetch:invalid:https://example.com}}
Invalid URL:
{{plugin:fetch:get:not-a-url}}
Non-text Content:
{{plugin:fetch:get:https://example.com/image.jpg}}
Server Error:
{{plugin:fetch:get:https://httpstat.us/500}}
Security Considerations
- Only use trusted URLs
- Be aware of rate limits
- Content is limited to 1MB
- Only text content types are allowed
- Consider URL allow listing in production
- Validate and sanitize fetched content before use