예제 #1
0
 /**
  * @return string|null
  */
 public function getAccessToken()
 {
     return $this->request->getAccessToken();
 }
예제 #2
0
 private function prepareRequestMessage(MailxpertRequest $request)
 {
     $url = $request->getUrl();
     if (strpos($url, 'http') !== 0) {
         $url = strpos($url, '/') === 0 ? $url : '/' . $url;
         $url = $this->getAPIUrl() . $url;
     }
     if ($request->getParams()) {
         $url .= '?' . http_build_query($request->getParams(), null, '&');
     }
     $body = $request->getBody();
     return [$url, $request->getMethod(), $request->getHeaders(), $body];
 }