Skip to content

Fixed Bug & support http2 Push - #175

Merged
devfeel merged 1 commit into
masterfrom
develop
Jan 2, 2019
Merged

Fixed Bug & support http2 Push#175
devfeel merged 1 commit into
masterfrom
develop

Conversation

@devfeel

@devfeel devfeel commented Jan 2, 2019

Copy link
Copy Markdown
Owner
  • Fixed Bug: Request.IsAJAX check X-Requested-With Contains XMLHttpRequest
  • New Feature: Response support http2 Push
  • How To:
    • how to query slow response in your app?
    func main() {
    	app := dotweb.Classic("/home/logs/wwwroot/")
    
    	// deal slow response, use default handler
    	// default Handler will write timeout-response in dotweb's log file
    	// also you can implement your own handlers, like write logs with http api
    	app.UseTimeoutHook(dotweb.DefaultTimeoutHookHandler, time.Second * 10)
    
    	app.HttpServer.GET("/index", func(ctx dotweb.Context) error{
    		return ctx.WriteString("welcome to my first web!")
    	})
    
    	//begin server
    	err := app.StartServer(80)
        fmt.Println("dotweb.StartServer error => ", err)
    }
  • 2019-01-02 18:00

* Fixed Bug: Request.IsAJAX check X-Requested-With Contains XMLHttpRequest
* New Feature: Response support http2 Push
* How To:
  - how to query slow response in your app?
  ~~~go
  func main() {
  	app := dotweb.Classic("/home/logs/wwwroot/")

  	// deal slow response, use default handler
  	// default Handler will write timeout-response in dotweb's log file
  	// also you can implement your own handlers, like write logs with http api
  	app.UseTimeoutHook(dotweb.DefaultTimeoutHookHandler, time.Second * 10)

  	app.HttpServer.GET("/index", func(ctx dotweb.Context) error{
  		return ctx.WriteString("welcome to my first web!")
  	})

  	//begin server
  	err := app.StartServer(80)
      fmt.Println("dotweb.StartServer error => ", err)
  }
  ~~~
* 2019-01-02 18:00
@devfeel
devfeel merged commit 46f14ba into master Jan 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant