Make a multipart/form-encoded request.

        Args:
            `method`: The method of the request (POST or PUT).
            `path`: The path to the resource.
            `data`: The JSON-encoded data.
            `filename`: The filename of the file to send.
        Returns:
            The content of the response.
        Raises:
            An exception depending on the HTTP status code of the response.

def _send_file(self, method, path, data, filename):
        """Make a multipart/form-encoded request.

        Args:
            `method`: The method of the request (POST or PUT).
            `path`: The path to the resource.
            `data`: The JSON-encoded data.
            `filename`: The filename of the file to send.
        Returns:
            The content of the response.
        Raises:
            An exception depending on the HTTP status code of the response.
        """
        with open(filename, 'r') as f:
            return self._make_request(method, path, data=data, files=[f, ])