Skip to content

Commit

Permalink
Merge pull request jefs42#8 from tacman/patch-2
Browse files Browse the repository at this point in the history
make _doRequest public to allow override of how to make request
  • Loading branch information
jefs42 committed Dec 18, 2023
2 parents dce7d90 + b0c0ee2 commit 2927203
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/LibreTranslate.php
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ public function getError() {

//====== send request to libretranslate server
// TODO: connection issue or libretranslate error message....
private function _doRequest($endpoint, $data = [], $type = 'POST') {
public function _doRequest($endpoint, $data = [], $type = 'POST') {
$this->lastError = '';
$finalEndpoint = $this->apiBase . ( !is_null($this->apiPort) ? ':' . $this->apiPort : '' ) . $endpoint;
$ch = \curl_init($finalEndpoint);
Expand Down

0 comments on commit 2927203

Please sign in to comment.