goproxy_html

package
v1.3.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: May 25, 2016 License: BSD-3-Clause, Apache-2.0 Imports: 9 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

extension to goproxy that will allow you to easily filter web browser related content.

Index

Constants

This section is empty.

Variables

View Source
var IsJavaScript goproxy.RespCondition = goproxy.ContentTypeIs("text/javascript",
	"application/javascript")
View Source
var IsWebRelatedText goproxy.RespCondition = goproxy.ContentTypeIs("text/html",
	"text/css",
	"text/javascript", "application/javascript",
	"text/xml",
	"text/json")

Functions

func HandleString

func HandleString(f func(s string, ctx *goproxy.ProxyCtx) string) goproxy.RespHandler

HandleString will receive a function that filters a string, and will convert the request body to a utf8 string, according to the charset specified in the Content-Type header. guessing Html charset encoding from the <META> tags is not yet implemented.

func HandleStringReader

func HandleStringReader(f func(r io.Reader, ctx *goproxy.ProxyCtx) io.Reader) goproxy.RespHandler

Will receive an input stream which would convert the response to utf-8 The given function must close the reader r, in order to close the response body.

Types

This section is empty.

Jump to

Keyboard shortcuts

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