def _format(self, json_body=False, **format_args):
    """Get endpoint format values.

    It caches the format values of endpoints and returns the same object.
    json_body -- boolean, if set to True all the parameters will be sent as
    JSON, otherwise the parameters will be sent as query string.
    format_args -- **kwargs, used to format the endpoint paths
    strings defined at the inner Meta class.
    """
    self.format_args = format_args
    self.json_body = json_body
    return self