Skip to content

Commit 18ae163

Browse files
committed
Add a getter for the client object
This will be useful in case anyone needs to break out and make custom HTTP requests
1 parent 1184805 commit 18ae163

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/PHPCouchDB/Server.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,4 +141,15 @@ public function useDb($options) : \PHPCouchDB\Database
141141
'Database doesn\'t exist, include "create_if_not_exists" parameter to create it'
142142
);
143143
}
144+
145+
/**
146+
* If you need to make a request that isn't supported by this library,
147+
* use this method to get the client to use. Aimed at more advanced
148+
* users/requirements
149+
*/
150+
public function getClient() : \GuzzleHttp\ClientInterface
151+
{
152+
return $this->client;
153+
}
154+
144155
}

0 commit comments

Comments
 (0)