Tag:http

  • MVC 5 restricts all HTTP requests to post

    Time:2021-8-11

    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

    Time:2021-8-4

    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

    Time:2021-5-6

    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

    Time:2021-1-22

    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

    Time:2021-1-16

    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

    Time:2020-12-23

    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 […]

  • Java Web project running error HTTP status 404 solution

    Time:2020-12-19

    Recently, I have been learning JSP and servlet, and I can’t avoid dealing with Tomcat. But Tomcat often has a variety of errors. Here are some common solutions I summarized, hoping to be useful to you. 1. Web application is not deployed 2. URL input error Troubleshooting: first, check whether the IP address and port […]

  • Understanding the implementation of HTTP server in golang

    Time:2020-12-12

    preface For golang, implementing a simplehttp serverIt’s very easy, just a few lines of code. At the same time, with the blessing of coroutine, go implementshttp serverCan achieve very good performance. This article will be on the go standard librarynet/httpIn order to learn and understand the common paradigm and design ideas of network programming, the […]

  • Example of golang using HTTP client to initiate get and post requests

    Time:2020-11-4

    To request remote web pages, golang can use the method provided by client in net / HTTP package. After checking the official website, there are some examples, but there are not too comprehensive examples, so I sorted out the following: Get request func httpGet() { resp, err := http.Get(“http://www.01happy.com/demo/accept.php?id=1”) if err != nil { // […]

  • Golang implements HTTP server to provide file download function

    Time:2020-11-2

    brief introduction Go (also known as golang) is a static strongly typed, compiled, parallel style programming language with garbage collection function developed by Google. Robert Griesemer, rob pike and Ken Thompson started to design go in September 2007, and Ian lance Taylor and Russ Cox joined the project later. Go is based on the Inferno […]

  • The solution of “the website refuses to display this webpage” and “HTTP 403 disable” when the computer opens the web page with the browser

    Time:2020-10-21

    Recently, when a user opened a web page with a browser in the computer system, the display website refused to display the web page and HTTP 403 error. The specific problems are as follows: Failure cause analysis: Such errors usually occur on a single website and should be caused by the wrong login cache information […]

  • Smooth restart and upgrade of golang HTTP service

    Time:2020-9-25

    When the golang HTTP service is online, it is necessary to recompile the executable file, close the running process, and then start a new running process. For the end-user-oriented products with high access frequency, there will be inaccessibility (nginx performance is 502) in the process of shutdown and restart, which will affect the end-user experience. […]