code: private function setGuzzleHeaders(RequestInterface $request, array $headers)
      {
          //iterate over the headers array and set each item
          foreach ($headers as $key => $value) {
              //Sets Header
              $request->setHeader($key, $value);
          }
  
          //return the request
          return $request;
      }
docs: Set Headers for a Request specified by $headers.
  
  @param RequestInterface $request a Guzzle Request
  @param array            $headers headers to set (should be an assoc array).