endpoints

package
v1.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 5, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package endpoints is a knowledgebase.Extractor that classifies a crawled request as an API endpoint (REST, GraphQL, SOAP, AJAX/XHR) by inspecting method, URL, headers, and content types. Emits per-response, one entry per qualifying request.

Output schema (all values strings unless noted):

class        : "rest" | "graphql" | "soap" | "xhr"
method       : uppercase HTTP verb
url          : request URL with userinfo and fragment stripped
content_type : lowercased media type without parameters (optional)
auth         : lowercased auth scheme, e.g. "bearer" / "basic" (optional)
params       : []string of query parameter names in first-seen order (optional)

The extractor is read-only with respect to its inputs: it MUST NOT mutate req or resp (headers, body, URL).

Index

Constants

View Source
const Name = "endpoints"

Variables

This section is empty.

Functions

This section is empty.

Types

type Extractor

type Extractor struct{}

func New

func New() *Extractor

func (*Extractor) Extract

func (e *Extractor) Extract(_ string, req *http.Request, resp *http.Response) map[string]any

func (*Extractor) Name

func (e *Extractor) Name() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL