package
Version:
v0.1.5
Opens a new window with list of versions in this module.
Published: Feb 17, 2026
License: MIT
Opens a new window with license information.
Imports: 8
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
- Constants
-
func DecodeBase64Body(encoded string) ([]byte, error)
-
func ReconstructRequest(headers, body []byte) []byte
-
func ResolvePath(arg string) (string, error)
-
func Write(flowID, url, method, reqHeaders string, reqBody []byte, respHeaders string, ...) (string, error)
-
type Meta
View Source
const (
BodyPlaceholder = "[[SECTOOL_BODY_FILE: body]]"
DefaultDir = "sectool-requests"
)
DecodeBase64Body decodes a base64-encoded body string to bytes.
func ReconstructRequest(headers, body []byte) []byte
ReconstructRequest rebuilds the full HTTP request from headers and body.
ResolvePath resolves a bundle path argument.
Tries the argument as-is first, then as ./sectool-requests/<arg>/.
Write writes a request bundle to ./sectool-requests/<flowID>/.
Uses restrictive permissions (0700 dirs, 0600 files) and rejects symlinks.
type Meta struct {
FlowID string `json:"flow_id"`
CapturedAt string `json:"captured_at"`
URL string `json:"url"`
Method string `json:"method"`
BodyIsUTF8 bool `json:"body_is_utf8"`
BodySize int `json:"body_size"`
}
Meta is request bundle metadata.
Read reads a request bundle from disk.
Returns headers (without body placeholder), body bytes, and metadata.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.