httplink

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package httplink parses the Link header from HTTP responses according to RFC5988

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Link struct {
	URI   string
	Param map[string]string
}
type Links []Link

func Parse

func Parse(headers []string) (Links, error)

Parse reads "Link" http headers into an array of Link structs. Header array should be the output of resp.Header.Values("link").

func (Links) Get

func (links Links) Get(parm, val string) (Link, error)

Get returns a link with a specific parm value, e.g. rel="next"

Jump to

Keyboard shortcuts

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