<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def api_request(self, method_name, params):
 """Execute an arbitrary method. Args: method_name (str):
 include the controller name: 'devices/search' params (dict):
 the method parameters Returns: A dict with the response Raises: requests.exceptions.HTTPError """

        url = self._method_url(method_name)
        data = json.dumps(params)
        return self._make_request(url=url, method="post", data=data)