Coder Social home page Coder Social logo

javaweb-demo's Introduction

##HTTP 消息的组成 起始行 消息头 空行 [可选的消息体]

##例子 GET 请求 GET /xxx/xxx/xxx.html HTTP/1.1
Accept: /
Accept-Language: zh-CN
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; CIBA; Tablet PC 2.0)
Accept-Encoding: gzip, deflate
Host: www.xxxxx.com
Connection: Keep-Alive
Cookie: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx [最后是空白行,必须有]

POST 请求
    POST /submit.do HTTP/1.1  
    Accept: */*  
    Accept-Language: zh-CN  
    User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; CIBA; Tablet PC 2.0)  
    Accept-Encoding: gzip, deflate  
    Content-Type: application/x-www-form-urlencoded;charset=utf-8
    Host: www.xxxxx.com  
    Connection: Keep-Alive  
    Cookie: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 
    [空白行,必须有]     
    name=xxx&age=xxx&pwd=xxx
响应
    HTTP/1.1 200 OK  
    Cache-Control: private  
    Content-Type: text/html; charset=utf-8  
    Content-Encoding: gzip  
    Server: nginx/1.11  
    Date: Mon, 20 Sep 2010 04:28:12 GMT  
    Content-Length: 55555  
    [空白行,必须有]     
    <html>....</html>

##Spring Boot不便于理解,新增spring-demo

javaweb-demo's People

Contributors

larryzeal avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.