PHP Cross Domain Proxy test page

A "jQuery enabled" test page where you can use the browser developer console to test.

All requests will be passed to the proxy so it can be tested even though requests aren't actually cross-domain.

Examples

// GET, no parameters
$.ajax({
    url: 'http://example.com',
})

// GET, with custom header 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',
    },
})

// 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',
})