Skip to content

Commit

Permalink
Merge pull request #1 from microsoft/dev
Browse files Browse the repository at this point in the history
Add a native response handler
  • Loading branch information
Ndiritu authored Jun 30, 2022
2 parents 72c5e9b + dd07ec5 commit 12dfc52
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/NativeResponseHandler.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php

namespace Microsoft\Kiota\Abstractions;

use Http\Promise\FulfilledPromise;
use Psr\Http\Message\ResponseInterface;
use Http\Promise\Promise;

/**
* Default response handler that returns the PSR-7 Response
*/
class NativeResponseHandler implements ResponseHandler
{
public function handleResponseAsync(ResponseInterface $response): Promise
{
return new FulfilledPromise($response);
}
}

0 comments on commit 12dfc52

Please sign in to comment.