• Golang HTTP connection reuse method


    Server terminal Golang httpserver enables the keepalive connection reuse option by default The handler function needs to read the body data completely and construct the return message. Otherwise, when the data cannot be sent at one time, the connection multiplexing will fail. Examples are as follows package main import ( “fmt” “io/ioutil” “log” “net/http” “os” […]

  • Examples of golang’s method of multiplexing http.request.body


    Problems and scenarios There are scenarios in the business where http. request. body needs to be distributed. For example, a Wechat callback message can only specify an address, so it is expected that a message can be copied and sent to other services. The micro-message callback information is processed by Service B together with Service […]