Skip to content

kailIII/php-rest-proxy

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

PHP REST-Proxy

Simple PHP REST-proxy, supports GET, POST, PUT and DELETE

Example Requests:

POST

$.ajax({
   url: 'index.php?url=http://www.arsenal.com/addPlayer/',
   type: 'POST',
   data: { name: 'Zlatan Ibrahimovic' },
   success: function(data) {
     console.log(data);
   }
});

GET

$.get( "index.php?url=https://www.facebook.com", function( data ) {
  console.log(data);
});

PUT

$.ajax({
   url: 'index.php?url=http://www.arsenal.com/players/10',
   type: 'PUT',
   data: { goals: 10000},
   success: function(data) {
     console.log(data);
   }
});

DELETE

$.ajax({
    url: 'index.php?url=http://www.manutd.com/players/10',
    type: 'DELETE',
    success: function(data) {
        console.log(data);
    }
});

About

Simple PHP Rest-proxy, supports GET, POST, PUT and DELETE

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%