HTTP works as a request-response protocol between a client and server.

A web browser may be the client, and an application on a computer that hosts a web site may be the server.

Example: A client (browser) submits an HTTP request to the server; then the server returns a response to the client. The response contains status information about the request and may also contain the requested content.

Two commonly used methods for a request-response between a client and server are:

  • GET - Requests data from a specified resource
  • POST - Submits data to be processed to a specified resource

GET

query strings (name/value pairs) is sent in the URL of a GET request:

/test/demo_form.asp?name1=value1&name2=value2
  • GET requests can be cached
  • GET requests remain in the browser history
  • GET requests can be bookmarked
  • GET requests should never be used when dealing with sensitive data
  • GET requests have length restrictions
  • GET requests should be used only to retrieve data

POST

query strings (name/value pairs) is sent in the HTTP message body of a POST request:

POST /test/demo_form.asp HTTP/1.1
Host: w3schools.com
name1=value1&name2=value2
  • POST requests are never cached
  • POST requests do not remain in the browser history
  • POST requests cannot be bookmarked
  • POST requests have no restrictions on data length

HTTP Methods: GET v.s POST的更多相关文章

  1. Android ndk另一种注册方式

    不使用Java_com_xxx方式调用ndk的方式,这种方法的优点是灵活,可配置,不必限制在Java_com_xxx命名依赖中. 步骤如下: 第1步,在JNI初始化方法中调用自定义注册方法,并判断成功 ...

  2. (转)java中的进程与线程

    (转自地址http://www.ibm.com/developerworks/cn/java/j-lo-processthread/) Java 进程的建立方法 在 JDK 中,与进程有直接关系的类为 ...

  3. Java多线程系列--“JUC集合”05之 ConcurrentSkipListMap

    概要 本章对Java.util.concurrent包中的ConcurrentSkipListMap类进行详细的介绍.内容包括:ConcurrentSkipListMap介绍ConcurrentSki ...

  4. Java集合容器简介

    Java集合容器主要有以下几类: 1,内置容器:数组 2,list容器:Vetor,Stack,ArrayList,LinkedList, CopyOnWriteArrayList(1.5),Attr ...

  5. Java与线程

    导语 我们知道,new一个thread,调用它的start的方法,就可以创建一个线程,并且启动该线程,然后执行该线程需要执行的业务逻辑, 那么run方法是怎么被执行的呢? Java线程和os线程 os ...

  6. Android线程池(二)

    本篇主要介绍Android自带的线程池的管理. 包含开始任务.重新加载.添加删除任务等,示例代码如下: package com.jiao.threadpooltest; import java.uti ...

  7. JNI调用的helloworld(JNI_OnLoad映射方式)

    本示例展示JNI的基本示例,helloworld级别的,不过是用JNI_OnLoad映射的方式. 直接看代码,先看包含native method的Person.java的代码: package hel ...

  8. Android线程池使用终结版

    有一段时间没写博文了,今天抽空总结一下,也希望能通过自己写的这些文章,加深理解的同时能帮 助在技术方面有疑点的朋友搞清楚个所以然来,由于经常会在网上或群里看到有朋友会问线程方面的 东西,就像我一个朋友 ...

  9. 浅析前端开发中的 MVC/MVP/MVVM 模式

    MVC,MVP和MVVM都是常见的软件架构设计模式(Architectural Pattern),它通过分离关注点来改进代码的组织方式.不同于设计模式(Design Pattern),只是为了解决一类 ...

随机推荐

  1. phpcms v9网站搬家更换域名的方法

    PHPCMS 是国内领先的网站管理系统,同时也是一个开源的PHP开发框架. 本文介绍phpcms v9网站搬家更换域名的方法. 1.在新的主机空间把phpcms安装好. 新安装的版本一定要和准备搬迁的 ...

  2. silverlight和wpf中暴露 给子类override

    protected virtual void OnSelectionChanged(SelectionChangedEventArgs args) { } public TestTabControl( ...

  3. currentStyle

    用js的style属性可以获得html标签的样式,但是不能获取非行间样式. 解决方法: 在IE下可以用currentStyle; 在FF下用getComputedStyle; 然而,为了让其兼容,解决 ...

  4. Linux使用du和df查看磁盘和文件夹占用空间

    df df可以查看一级文件夹大小.使用比例.档案系统及其挂入点,但对文件却无能为力. df -lh 参数 -h 表示使用「Human-readable」输出,也就是使用 GB.MB 等易读的格式. $ ...

  5. 2016.8.21 JavaScript 入门

    1.JavaScript的数据类型: ①undefined ②null ③boolean ④string ⑤symbol ⑥number,    object 2.在JavaScript中所有的变量和 ...

  6. javascript优化--12模式(设计模式)03

    观察者模式 通过创建一个可观察的对象,当发生一个感兴趣的事件时将该事件通告给所有观察者,从而形成松散的耦合 订阅杂志 //发布者对象 var publisher = { subscribers: { ...

  7. Javascript参考手册

    ---------------------------------------------------------------------------------------------------- ...

  8. wpf,CollectionViewSource,使用数据过滤 筛选 功能。

    class TextListBoxVMpublic : ViewModelBase { public TextListBoxVMpublic() { var list = this.GetEmploy ...

  9. Qt-note0906

    1.在Qt中每一个类都有一个与其同名的头文件: 2.任何一个Qt GUI程序都要有一个QApplication对象: 3.在默认情况下,新建的可视部件对象都是不可见的,要使用show()函数让它们显示 ...

  10. SPFA+Dinic HDOJ 3416 Marriage Match IV

    题目传送门 题意:求A到B不同最短路的条数(即边不能重复走, 点可以多次走) 分析:先从A跑最短路,再从B跑最短路,如果d(A -> u) + w (u, v) + d (B -> v) ...