def query(  <EOL>self,<EOL>url: Union[str, methods],<EOL>data: Optional[MutableMapping] = None,<EOL>headers: Optional[MutableMapping] = None,<EOL>as_json: Optional[bool] = None,<EOL>) -> dict:
url, body, headers = sansio.prepare_request(<EOL>url=url,<EOL>data=data,<EOL>headers=headers,<EOL>global_headers=self._headers,<EOL>token=self._token,<EOL>)<EOL>return self._make_query(url, body, headers)<EOL>
Query the slack API

When using :class:`slack.methods` the request is made `as_json` if available

Args:
    url: :class:`slack.methods` or url string
    data: JSON encodable MutableMapping
    headers: Custom headers
    as_json: Post JSON to the slack API
Returns:
    dictionary of slack API response data