Gin Web Framework
  • Documentation
  • Blog
  • GitHub
    Gin Middleware
  • Português
    • English
    • 日本語
    • Español
    • Turkish
    • Persian
    • 简体中文
    • 繁體中文
    • 한국어
Português
  • English
  • 日本語
  • Español
  • Turkish
  • Persian
  • 简体中文
  • 繁體中文
  • 한국어
  • Documentation
    • Introduction
    • Quickstart
    • Benchmarks
    • Features
    • Jsoniter
    • Deployment
    • Examples
      • AsciiJSON
      • Bind form-data request with custom struct
      • Bind html checkboxes
      • Bind query string or post data
      • Bind Uri
      • Build a single binary with templates
      • Controlling Log output coloring
      • Custom HTTP configuration
      • Custom log file
      • Custom Middleware
      • Custom validators
      • Define format for the log of routes
      • Goroutines inside a middleware
      • Graceful restart or stop
      • Grouping routes
      • How to write log file
      • HTML rendering
      • HTTP2 server push
      • JSONP
      • Map as querystring or postform parameters
      • Model binding and validation
      • Multipart/Urlencoded binding
      • Multipart/Urlencoded form
      • Multitemplate
      • Only bind query string
      • Parameters in path
      • PureJSON
      • Query and post form
      • Query string parameters
      • Redirects
      • Run multiple service
      • SecureJSON
      • Serving data from reader
      • Serving static files
      • Set and get a cookie
      • Support Let's Encrypt
      • Try to bind body into different structs
      • Upload files
        • Multiple files
        • Single file
      • Using BasicAuth middleware
      • Using HTTP method
      • Using middleware
      • Without middleware by default
      • XML/JSON/YAML/ProtoBuf rendering
    • Testing
    • Users
    • FAQ
查看页面源码 编辑此页 添加子页面 提交文档问题 提交项目问题
  1. Documentation
  2. Examples

Examples

The section lists api usage.


AsciiJSON

Bind form-data request with custom struct

Bind html checkboxes

Bind query string or post data

Bind Uri

Build a single binary with templates

Controlling Log output coloring

Custom HTTP configuration

Custom log file

Custom Middleware

Custom validators

Define format for the log of routes

Goroutines inside a middleware

Graceful restart or stop

Grouping routes

How to write log file

HTML rendering

HTTP2 server push

JSONP

Map as querystring or postform parameters

Model binding and validation

Multipart/Urlencoded binding

Multipart/Urlencoded form

Multitemplate

Only bind query string

Parameters in path

PureJSON

Query and post form

Query string parameters

Redirects

Run multiple service

SecureJSON

Serving data from reader

Serving static files

Set and get a cookie

Support Let's Encrypt

Try to bind body into different structs

Upload files

Using BasicAuth middleware

Using HTTP method

Using middleware

Without middleware by default

XML/JSON/YAML/ProtoBuf rendering

最后修改 21.03.2023: docs(pt): prepare the ground to translate docs to portuguese (#198) (e171f58)
© 2023 Gin Team 保留所有权利