Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DrainBody ¶
func DrainBody(b io.ReadCloser) (rb []byte, nopb io.ReadCloser, err error)
DrainBody reads all of b to memory and then returns bytes of b and a ReadCloser yielding the same bytes.
It returns an error if the initial slurp of all bytes fails. It does not attempt to make the returned ReadCloser have identical error-matching behavior.
func ResolveReferenceURL ¶
ResolveReferenceURL resolves a URI reference to an absolute URI from an absolute base URI u, per RFC 3986 Section 5.2. The URI reference may be relative or absolute. ResolveReferenceURL always returns a new URL instance, even if the returned URL is identical to either the base or reference. If ref is an absolute URL, then ResolveReferenceURL ignores base and returns a copy of ref.
Types ¶
This section is empty.