Http Get Pass Date type parameter
Today's test system to provide external APIs, found that do not know how to pass the date type parameters, Google, Baidu for a while there is no corresponding reply. So he pondered the experiment, the
Problem:A GET request is sent to the server via the HTTP protocol and some parameters are added to the request. Discussion: A GET request allows a query string to be used as a parameter, in the following format:
Client-side JS does not require any special settings, using the usual Ajax calls:$.ajax ({ URL: ' Cross-domain URL ', type: ' Get ', dataType: ' json ', success:function (data) { $ (' #banner_ Right '). HTML (data);} });The
Currently, the most popular cross-platform interaction is interoperation through JSON objects through http protocol. This method is simple and efficient. The WebService + XML method seems outdated.
The following is an example
Webapi code
View
1. httpclient the description of httpclient is used to simulate HTTP requests. In fact, the essence is to simulate HTTP requests and send them to the Web server;
Android has integrated httpclient, so it can be used directly;
Note: The httpclient
CURL implements the http get post method, and curl implements getpostCurl is the next powerful http command line tool in Linux and has powerful functions.I. CURL regular access to HTTP1. Visit the website$ Curl http://www.linuxidc.comAfter you press
Differences between http get and post requests and getpost requests
Whether a request calls servlet's doGet or doPost does not depend on httbench vlet. No Default call method is provided. If your request is get, you can call doGet. If your request
There were not many opportunities to access HTTP before. Recently, I encountered a problem that I needed to use C language to implement HTTP interaction. So I went online to learn about this article.There are many articles on the Internet about the
The following content is reprint content, very good.First, the question:Coding problem is Java beginners in the Web development process often encounter problems, there are a lot of relevant articles on the Internet, but many of the articles do not
Http defines different ways to interact with the server. The most important methods are 4 kinds. Each is get POST PUT DELETE, url full resource Descriptive descriptor, we can think of a URL address, a URL address, it is used to describe a network of
Each browser http GET request URL maximum length is not the same, a few types of common browser maximum length and the maximum length after the submission of the following:Ie6.0:url the maximum length of 2,083 characters and cannot be submitted
Difference between http Get and Post, difference between getpost1. Get is a request to request data from the server, and Post is a request to submit data to the server;2. get is to add the parameter data queue to the URL referred to by the action
The number of parameters in the Libcurl library curlopt_writefunction The callback function that should be set:size_t FUN_CB (char *ptr, size_t size, size_t nmemb, void *userdata)The callback function is called when the response data arrives, and
An explanation of HTTP requests has been explained in my blog:http://blog.csdn.net/xiazdong/article/details/7215296I have encapsulated a helper class for HTTP requests in http://blog.csdn.net/xiazdong/article/details/7725867, so it is easy to send
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.