All Questions

522
votes
11answers
1042388 views

jQuery Ajax POST example with PHP

I am trying to send data from a form to a database. Here is the form I am using: <form name="foo" action="form.php" method="POST" id="foo"> <label for="bar">A bar</label> &l...
553
votes
20answers
972521 views

jQuery Ajax File Upload

Can I use the following jQuery code to perform file upload using post method of an Ajax request ? $.ajax({ type: "POST", timeout: 50000, url: url, data: dataString, success: funct...
1180
votes
25answers
1083638 views

JavaScript post request like a form submit

I'm trying to direct a browser to a different page. If I wanted a GET request, I might say document.location.href = 'http://example.com/q=a'; But the resource I'm trying to access won't respond pro...
4088
votes
31answers
1478043 views

PUT vs. POST in REST

According to the HTTP/1.1 Spec: The POST method is used to request that the origin server accept the entity enclosed in the request as a new subordinate of the resource identified by the Request-...
312
votes
8answers
687212 views

Send POST data using XMLHttpRequest

I'd like to send some data using an XMLHttpRequest in JavaScript. Say I have the following form in HTML: <form name="inputform" action="somewhere" method="post"> <input type="hidden" va...
620
votes
6answers
767012 views

How to make HTTP POST web request

How can I make an HTTP request and send some data using the POST method? I can do GET request but have no idea how to make a POST.
293
votes
8answers
495974 views

What is the difference between POST and GET?

I've only recently been getting involved with PHP/AJAX/jQuery and it seems to me that an important part of these technologies is that of POST and GET. First, what is the difference between POST and G...
244
votes
14answers
592268 views

Java - sending HTTP parameters via POST method easily

I am successfully using this code to send HTTP requests with some parameters via GET method function void sendRequest(String request) { // i.e.: request = "http://example.com/index.php?param1=a&...
476
votes
10answers
635434 views

How do I send a POST request with PHP?

Actually I want to read the contents that come after the search query, when it is done. The problem is that the URL only accepts POST methods, and it does not take any action with GET method... I hav...
215
votes
15answers
332206 views

How to add parameters to HttpURLConnection using POST

I am trying to do POST with HttpURLConnection(I need to use it this way, can't use HttpPost) and I'd like to add parameters to that connection such as post.setEntity(new UrlEncodedFormEntity(nvp)); ...

Previous Next