PHP Cross Domain Proxy test page

Edit an example and push 🛫, or just use the browser developer console.

The proxy is configured with the below whitelist.



	

Examples

// GET, plain and simple
$.get('https://example.com')
// GET, with a custom header, a proxied cookie, and some parameters using both url and data property
$.ajax({
	method: 'GET',
	url: 'http://localhost/php-cross-domain-proxy/test/echo.php?c=3',
	data: {a:1, b:2},
	headers: {
		'X-TestRequestHeader': 'Fluffy bunny',
		'X-Proxy-Cookie': 'jsessionid=AS348AF929FK219CKA9FK3B79870H;',
	},
})
// POST, with both post data in property and a get parameter in the url
$.ajax({
	method: 'POST',
	url: 'http://localhost/php-cross-domain-proxy/test/echo.php?c=3',
	data: {a:1, b:2},
})
// PUT, with data encoded as json
$.ajax({
	method: 'PUT',
	url: 'http://localhost/php-cross-domain-proxy/test/echo.php',
	contentType: 'application/json',
	data: JSON.stringify({a:1, b:2}),
})
// DELETE, with get parameter
$.ajax({
	method: 'DELETE',
	url: 'http://localhost/php-cross-domain-proxy/test/echo.php?id=1',
})