Tag: http

62 votes
18 answers
1.2K views
Origin is not allowed by Access-Control-Allow-Origin

I'm making an Ajax.request to a remote PHP server in a Sencha Touch 2 application (wrapped in PhoneGap).

avatar
Patsy
0 1 0 9
asked 07 September, 2021
63 votes
8 answers
2.3K views
How many concurrent AJAX (XmlHttpRequest) requests are allowed in popular browsers?

In Firefox 3, the answer is 6 per domain: as soon as a 7th XmlHttpRequest (on any tab) to the same domain is f

avatar
Lawanda
0 1 0 9
asked 07 September, 2021
61 votes
6 answers
1K views
WebSockets protocol vs HTTP

There are many blogs and discussions about WebSocket and HTTP, and many developers and sites strongly advocate

avatar
Nereida
0 1 0 9
asked 07 September, 2021
47 votes
8 answers
1.4K views
Access Control Request Headers, is added to header in AJAX request with jQuery

I would like to add a custom header to an AJAX POST request from jQuery. I have tried this: $.ajax({ ty

avatar
Sena
0 1 0 9
asked 07 September, 2021
50 votes
9 answers
1.1K views
What is the motivation behind the introduction of preflight CORS requests?

Cross-origin resource sharing is a mechanism that allows a web page to make XMLHttpRequests to another domain

avatar
Yolando
0 1 0 9
asked 07 September, 2021
59 votes
21 answers
2.4K views
How can I post data as form data instead of a request payload?

In the code below, the AngularJS $http method calls the URL, and submits the xsrf object as a "Request Payload

avatar
Sena
0 1 0 9
asked 07 September, 2021
55 votes
25 answers
699 views
Response to preflight request doesn't pass access control check

I'm getting this error using ngResource to call a REST API on Amazon Web Services: XMLHttpRequest cannot

avatar
Sydney
0 1 0 9
asked 07 September, 2021
51 votes
13 answers
1.6K 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:

avatar
Jesenia
0 1 0 9
asked 07 September, 2021
62 votes
7 answers
1.8K views
Are the PUT, DELETE, HEAD, etc methods available in most web browsers?

I've seen a couple questions around here like How to debug RESTful services, which mentions: Unfortun

avatar
Wilber
0 1 0 9
asked 07 September, 2021
51 votes
15 answers
1.4K views
How to manually send HTTP POST requests from Firefox or Chrome browser

I want to test some URLs in a web application I'm working on. For that I would like to manually create HT

avatar
Tana
0 1 0 9
asked 07 September, 2021
65 votes
9 answers
1.7K views
What does enctype='multipart/form-data' mean?

What does enctype='multipart/form-data' mean in an HTML form and when should we use it?

avatar
Stacia
0 1 0 9
asked 07 September, 2021
66 votes
11 answers
912 views
How to use java.net.URLConnection to fire and handle HTTP requests

Use of java.net.URLConnection is asked about pretty often here, and the Oracle tutorial is too concise about i

avatar
Vi
0 1 0 9
asked 07 September, 2021
60 votes
6 answers
1.6K views
Handling PUT/DELETE arguments in PHP

I am working on my REST client library for CodeIgniter and I am struggling to work out how to send PUT and DEL

avatar
Benton
0 1 0 9
asked 07 September, 2021
57 votes
9 answers
2.5K views
PHP_SELF vs PATH_INFO vs SCRIPT_NAME vs REQUEST_URI

I am building a PHP application in CodeIgniter. CodeIgniter sends all requests to the main controller: index.p

avatar
Nidia
0 1 0 9
asked 07 September, 2021
57 votes
30 answers
2.6K views
How can I upload files asynchronously with jQuery?

I would like to upload a file asynchronously with jQuery. $(document).ready(function () { $("#uploa

avatar
Dario
0 1 0 9
asked 07 September, 2021
60 votes
17 answers
2.3K views
How do I implement basic "Long Polling"?

I can find lots of information on how Long Polling works (For example, this, and this), but no simple examples

avatar
Renaldo
0 1 0 9
asked 07 September, 2021
56 votes
13 answers
1.1K views
Detecting request type in PHP (GET, POST, PUT or DELETE)

How can I detect which request type was used (GET, POST, PUT or DELETE) in PHP?

avatar
Omar
0 1 0 9
asked 07 September, 2021
63 votes
30 answers
2.2K views
How do I make a redirect in PHP?

Is it possible to redirect a user to a different page through the use of PHP? Say the user goes to www.exampl

avatar
Sachiko
0 1 0 9
asked 07 September, 2021
46 votes
3 answers
909 views
What's the difference between mediatype, contenttype and mimetype?

Is there a difference between mimetype, contenttype and mediatype? (Java's JAX-RS MediaType). From the

avatar
Joseph
0 1 0 9
asked 07 September, 2021
49 votes
4 answers
496 views
What is the usefulness of PUT and DELETE HTTP request methods?

I have read a lot stuff about this but not able to get the conclusion on this topic. But I've never use

avatar
Janella
0 1 0 9
asked 07 September, 2021