domain

package
v0.6.7 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package domain defines core request and response types.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DetectTransport added in v0.5.0

func DetectTransport(url string, hasGraphQL bool) string

DetectTransport determines the transport type from URL scheme and GraphQL content.

Types

type Request

type Request struct {
	URL      string
	Method   string
	Headers  map[string]string
	Body     io.Reader // Streamable body
	Metadata map[string]string
}

Request represents an outgoing API request.

func (*Request) SetHeader added in v0.5.0

func (r *Request) SetHeader(key, value string)

SetHeader sets a header value, initializing the Headers map if needed.

type Response

type Response struct {
	StatusCode int
	Headers    map[string]string
	Body       io.ReadCloser // Streamable response
	Duration   time.Duration
}

Response represents the result of an API request.

Jump to

Keyboard shortcuts

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