HTML forms GET/POST
When a "submit" action is made (by a button or other)
the client will send data to the server
The are two methods of interacting with the server: GET and POST




Submit a GET

Used when requesting data from the server




the address in the browser will be like

    http://httpbin.org/get?say=Hello+From+Me!&to=My+dear+friend ......
                          |                  |
    |--------------------|?|----------------|&|---------------|
            |                    |                   | 
    PathFromAction          Name1=Value1        Name2=value2 
                            +concatenator       +concatenator

Submit a POST

Change something in the server


    http://httpbin.org/post 
        PathFromAction

This is a sample Get form

url in the address bar is

    http://httpbin.org/get?say=Hi&to=Mom

data sent to the server is


{
"args": {
    "say": "Hi", 
    "to": "Mom"
}, 

This is a sample Post form

url in the address bar is

    http://httpbin.org/post

data sent to the server is


{
"args": {}, 
"data": "", 
"files": {}, 
"form": {
    "say": "Hi", 
    "to": "Mom"
}
back to main page