client

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Response

type Response struct {
	// Data contains the raw data returned from the server.
	// TODO: implement function to pipe this straight to Gemtext parser
	Data []byte
	// MetaData contains the metadata of the response.
	// If StatusCode == 20, it is the MIME type associated with the data
	MetaData string
	// StatusCode contains the status code returned by the server.
	// If this is not 20, Data should be considered to be empty
	StatusCode int
}

Response represents a Gemini Response

func Request

func Request(address string, tlsConfig *tls.Config) (*Response, error)

Request sends a Gemini request to address tlsConfig will be removed in a future update. Per the tls.Client documentation,

The config cannot be nil: users must set either ServerName or InsecureSkipVerify in the config.

TODO: Does not currently handle redirects.

Jump to

Keyboard shortcuts

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