tpkeeper / gin-dump Goto Github PK
View Code? Open in Web Editor NEWGin middleware to dump header/body of request and response.Very helpful for debugging your applications.
License: MIT License
Gin middleware to dump header/body of request and response.Very helpful for debugging your applications.
License: MIT License
Current behavior:
Expected behavior
DumpWithOptions(hideFields []string,showReq bool, showResp bool, showBody bool, showHeaders bool, showCookies bool, cb func(dumpStr string)) gin.HandlerFunc
Tried to go get your middleware but it resulted in the following,
go get -u github.com/tpkeeper/gin-dump
go: finding golang.org/x/sys latest
go: finding github.com/gin-contrib/sse latest
go: finding gopkg.in/check.v1 latest
go: extracting github.com/ugorji/go v1.1.4
go: extracting github.com/ugorji/go/codec v0.0.0-20181022190402-e5e69e061d4f
go build github.com/ugorji/go/codec: no Go files in
I do not understand why it is trying to get two version of ugorji/go?
Hi! Nice work!
Would be nice if the Dump() method did not require "nil" to perform standard (stdout) and if you could add examples to the README showing how to use the middleware in both groups and endpoints aswell:
Group
router := gin.New()
dumpAll := router.Group("/group")
dumpAll.Use(gindump.Dump(nil))
dumpAll.POST("/", MyEndpointHandler)
dumpAll.PUT("/", MyOtherEndpointHandler)
Endpoint
router := gin.New()
dumpOne := router.Group("/group")
dumpOne.POST("/", gindump.Dump(nil), MyEndpointHandler)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.