• VBS obtains the implementation code of HTTP content compressed by gzip


    In order to improve the loading speed, many websites enable the gzip compression function of the HTTP server. When the HTTP request sent by the client declares that gzip coding can be accepted, the server automatically gzip compresses the HTTP response content. However, it is not so easy to decompress the gzip code automatically in […]

  • Golang language minimalist HTTP client gorequest


    1 Introduction Gorequest is a minimalistHTTPClient, the author is inspired by the node.js library SuperAgent. comparisonGolangThe standard library, net / HTTP, makes gorequest easier to use. The official slogan of gorequest is “send a request like a machine gun”. Gorequest includes the following functions: HTTP request mode supported: get / post / put / head […]

  • How did the error code 451 appear on the new HTTP page?


    Recently, the Internet Engineering Steering Group (IETF) approved a new HTTP status error code “451”, which is officially interpreted as“Not available for legal reasons”。 Obviously, the emergence of this code means that the approval of Internet content will be more open and transparent, and the legalized management of internet order will be more perfect. This […]

  • The relationship between gin and net / HTTP


    Gin is one of the most widely used frameworks in go. Understanding the principle of gin framework will help us to better use gin. Reading the source code of this series of gin will gradually explain the principle of gin. Welcome to follow-up articles. Gin overview To understand gin, you need to understand the following […]

  • Go implements the operation of HTTP middleman proxy


    goproxy Go HTTP (s) proxy library, which supports man in the middle proxy to decrypt HTTPS Project address install go get github.com/ouqiang/goproxy use package main import ( “net/http” “time” “github.com/ouqiang/goproxy” ) func main() { proxy := goproxy.New() server := &http.Server{ Addr: “:8080”, Handler: proxy, ReadTimeout: 1 * time.Minute, WriteTimeout: 1 * time.Minute, } err := […]

  • The ASP. Net server cannot set the content type after sending the HTTP header


    Problems found: Export excel with npoi, the foreground page is still ASPX, and then report the error of “failed to receive message from the server”. Solution: Error about “the server cannot set the content type after sending the HTTP header”:       1. Myxls is used to export components       2. The page adopts ASPX 3. […]

  • MVC 5 restricts all HTTP requests to post


    Today, a colleague raised the question that he wanted to restrict all HTTP requests received by MVC to post. Next, in the following content, I will share the way I think to you. If you have other ways, please leave a message. 1、 Httppostattribute attribute When you first think of it, MVC providesHttpPostAttributeFeature is used […]

  • HTTP status code and its definition parsing Ajax catch callback error reference


    HTTP status code and its definition parsing Ajax catch callback error reference  The status line contains the HTTP version, status code, and short description information corresponding to the status code. In most cases, all response headers except content type are optional. However, content type is required. It describes the MIME type in the following documents. […]

  • Sample implementation of golang HTTP captcha


    Captcha is the abbreviation of “completely automated Public Turing test to tell computers and humans apart”. It is a kind of public automatic program to distinguish whether a user is a computer or a human. Can prevent: malicious password cracking, ticket swiping, Forum irrigation, effectively prevent a hacker to a specific registered user with a […]

  • Example code for golang to send HTTP get request


    Using the standard library HTTP to achieve package tools import ( “io/ioutil” “net/http” ) func Get(url string)string{ res, err :=http.Get(url) if err != nil { return “” } robots, err := ioutil.ReadAll(res.Body) res.Body.Close() if err != nil { return “” } return string(robots) } The above is the detailed content of the sample code of […]

  • How to send HTTP request based on Python + requests


    This article mainly introduces how to send HTTP requests based on Python + requests. The sample code is introduced in great detail, which has a certain reference learning value for everyone’s study or work. Friends in need can refer to it 1、 In the process of interface automatic test, there are two situations One is […]

  • Troubleshooting and solution of HTTP timeout in go


    background Recently, some colleagues have reported that there is a call timeout between services, and the probability and frequency of occurrence are relatively high in the business peak. From the call relationship in the log, there are 2 call chains that often have timeouts. Problem 1: service a timed out sending a request to service […]