/** * Send the appropriate request header based on the method that's required * * @param UrlQuery $urlQuery The object for the API endpoint * @param string $method Either `get` or `delete` * @param bool $associativeArrays Whether or not to return the information as an associative array * @param array $headers An array with the cURL headers received * * @return mixed */ private function sendIndividualRequest($urlQuery, $method, $associativeArrays, &$headers) { if ($method === "get") { return $urlQuery->sendGet("", $associativeArrays, $headers); } else { if ($method === "delete") { return $urlQuery->sendDelete($associativeArrays, $headers); } } throw new \InvalidArgumentException("Invalid request method"); }