Skip to content

Commit

Permalink
Merge pull request #30 from line/fix/base_uri_handling
Browse files Browse the repository at this point in the history
Fix the handling to specify endpoint base URI
  • Loading branch information
Vaduz authored Oct 19, 2016
2 parents a86c3de + d624fca commit 439e096
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/LINEBot.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,11 @@ public function __construct(HTTPClient $httpClient, array $args)
{
$this->httpClient = $httpClient;
$this->channelSecret = $args['channelSecret'];
$this->endpointBase =
array_key_exists('endpointBase', $args) && $args['endpointBase'] ?: LINEBot::DEFAULT_ENDPOINT_BASE;

$this->endpointBase = LINEBot::DEFAULT_ENDPOINT_BASE;
if (array_key_exists('endpointBase', $args) && !empty($args['endpointBase'])) {
$this->endpointBase = $args['endpointBase'];
}
}

/**
Expand Down

0 comments on commit 439e096

Please sign in to comment.