examples

package
v2.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: May 23, 2019 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package examples demonstrates httpexpect usage.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EchoHandler

func EchoHandler() http.Handler

EchoHandler creates http.Handler using echo framework.

Routes:

GET /login             authenticate user and return JWT token
GET /restricted/hello  return "hello, world!" (requires authentication)

func FastHTTPHandler

func FastHTTPHandler() fasthttp.RequestHandler

FastHTTPHandler creates fasthttp.RequestHandler.

Routes:

GET /ping   return "pong"

func FruitsHandler

func FruitsHandler() http.Handler

FruitsHandler creates http.Handler for the fruits server.

Routes:

GET /fruits           get fruit list
GET /fruits/{name}    get fruit
PUT /fruits/{name}    add or update fruit

func GaeHandler

func GaeHandler() http.Handler

GaeHandler creates http.Handler to run in the Google App Engine.

Routes:

GET /ping   return "pong"

func IrisHandler

func IrisHandler() http.Handler

IrisHandler tests iris v6's handler

func WsFastHandler

func WsFastHandler(ctx *fasthttp.RequestCtx)

WsFastHandler is a simple fasthttp.RequestHandler that implements WebSocket echo server.

func WsHttpHandler

func WsHttpHandler(w http.ResponseWriter, r *http.Request)

WsHttpHandler is a simple http.Handler that implements WebSocket echo server.

Types

This section is empty.

Jump to

Keyboard shortcuts

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