官术网_书友最值得收藏!

The GET Method

GET is a method of the HTTP protocol which is used to get a resource from the server. Requests which use the GET method should only retrieve the data and should not have any side effect. This means that if you fire the same GET request again and again, you should get the same data, and there should not be any change in the state of the server as a result of this GET request.

In the GET method, the parameters are sent as part of the request URL and will therefore be visible to the end user. The advantage of this approach is that the user can bookmark the URL and visit the page again whenever they want. An example is https://yourwebsite.com/?tech=mvc6&db=sql.

We are passing a couple of parameters in the preceding GET request. tech is the first parameter, with the value mvc6, and db is the second parameter, with the value sql. Assume your website takes the preceding parameters with values and searches in your database to retrieve the blog posts that talk about mvc6 and sql before presenting those blog posts to the user:

The disadvantage of the GET method is that, as the data is passed in clear text in the URL as parameters, it cannot be used to send sensitive information. Moreover, most browsers have limitations on the number of characters in the URL, so, when using GET requests, we cannot send large amounts of data.

主站蜘蛛池模板: 普安县| 繁昌县| 肥西县| 尼木县| 邮箱| 二手房| 睢宁县| 安图县| 寿阳县| 尤溪县| 阿鲁科尔沁旗| 碌曲县| 思南县| 堆龙德庆县| 方山县| 唐山市| 天津市| 宜阳县| 五家渠市| 通城县| 井冈山市| 西平县| 竹山县| 高碑店市| 库车县| 台北市| 广饶县| 山丹县| 宜城市| 获嘉县| 葫芦岛市| 合川市| 金昌市| 大厂| 永城市| 巴马| 灌南县| 长宁县| 达日县| 东乌| 蒲城县|