1. http request format:
[]
In an HTTP request, the first line must be a request line to describe the request type, resources to be accessed, and the HTTP Version Used. Next is a header section, which describes additional information to be
I finally finished all the courses I was about to attend. The intensity was too high. I was too tired to write my blog. I haven't written it for a long time... But now we have to summarize it gradually!
Since we are mainly studying network
I have just done a few experiments and read the following code:The following content must be replied before you can seeJquery_data.phpCopy codeThe Code is as follows:Echo "post :";Print_r ($ _ POST );Echo "get :";Print_r ($ _ GET );?>
The two methods of $.get () and $.post (), as the name implies, are getting the data through the Get method, and the other one obtains the data through the Post method. What is the difference between these two methods? The emphasis has three aspects
The function used is Curl_init, curl_setopt, Curl_exec,curl_close.
The default is the Get method, which allows you to choose whether to use headers:
$ch = Curl_init ();
curl_setopt ($ch, Curlopt_url, "$url");
curl_setopt ($ch, Curlopt_timeout,
Get Two arguments, a URL, a callback
post three parameters, a URL, a parameter, a callback
HTTP Request: Get vs. POST
Two common ways to request-respond on both the client and server side are: Get and POST. Get-Request data POST from the
Garbled reason: HTTP request transmission will be the URL to iso-8859-1 encoding, the server received a stream of bytes after the default will be encoded to iso-8859-1 code to decode into character streams (resulting in Chinese garbled)
POST request:
The differences between the two are as follows:
The data uploaded by GET is usually very small and has low security performance. The data uploaded by POST is suitable for scenarios with large data volumes, complex data types, and high data security
Sometimes we need to keep the GET and POST parameters transmitted on the next page or for other purposes!At work, I wrote such code!I hope you will have more exchanges!
/*Program Design: Lin Jianxuan (floating maple design room)Made in Zhuhai by 2007
This article describes how php uses CURL to simulate GET and POST requests to the interface and how to obtain data. It also analyzes php's skills in submitting and obtaining data from the interface using curl in the form of an instance, for more
Code
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->
Introduce namespace
Using
System. IO;
Using
System. net;
Using
System. text;
Using
System. Text. regularexpressions; //
1: The method for submitting a form is different.Use the get method to submit a form. The request parameters are in the request header. You can use the request. getQueryString () method to obtain the request parameters,The return value of the
1. get is to get data from the server, and post is to send data to the server.2. get is to add the parameter data queue to the URL referred to by the ACTION attribute of the submission form. The values correspond to each field in the form one by one
I. Introduction
Httpclient is a sub-project under Apache Jakarta common. It is used to provide an efficient, up-to-date, and function-rich client programming toolkit that supports http protocol. It also supports the latest versions and suggestions
I have just done a few experiments and read the following code:
The following content must be replied before you can see
Jquery_data.php
Copy codeThe Code is as follows: Echo "post :";
Print_r ($ _ POST );
Echo "get :";
Print_r ($ _ GET );
?>
Jquery_
RT... I used to think Android Network Communication is amazing. Magic... I recently learned about the network. Now I want to summarize how to do it.
Let's take an example to illustrate the principle.
Let's talk about the usefulness of this Demo:
1.
①. Post method: This method is relatively simple. You only need to add the code in the background as long as the format of the browser page encoding is used in the background: Request. setcharacterencoding ("SHIFT-JIS"); // encoding format of the
Using system; using system. Text; using system. IO; using system. LINQ; using system. Net; /// /// Utility Class. This class supports reading webpages using get and post methods, and supports proxy and cookie /// public class pageloader {Public
HTTP defines different methods for interaction with the server. There are four basic methods: Get, post, put, and delete. The full name of a URL is a resource descriptor. We can think that a URL address is used to describe resources on a network,
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.