Software Alternatives & Reviews

Using Laravel as a service proxy/gateway

HTTPie httpbin(1)
  1. 1
    CLI HTTP that will make you smile. JSON support, syntax highlighting, wget-like downloads, extensions, and more.
    Pricing:
    • Open Source
    The code should be pretty straighforward. For every request to /proxy/{path}, it would make a request to httpbin.org/{path} with the same HTTP method. You could try requesting the new endpoint using different methods to see it in effect. Here I used HTTPie to test the endpoint:.

    #CLI #Command Line Tools #Curl 46 social mentions

  2. HTTP request and response service
    Pricing:
    • Open Source
    Use GuzzleHttp\Client as HttpClient; Route::any('/proxy/{path}', function(Request $req, $path) { $client = new HttpClient([ 'base_uri' => 'https://httpbin.org' ]); return $client->request($req->method(), $path); });.

    #Developer Tools #Proxy #Testing 53 social mentions

Discuss: Using Laravel as a service proxy/gateway

Log in or Post with