public function postMedia($call, $filename)
    {
        $this->resetCallState();

        $this->call = $call;

        $this->method = 'POST';

        $this->withMedia = true;

        $mimeBoundary = sha1($call . microtime());

        $params = array(
            'post' => $this->buildMultipart($mimeBoundary, $filename),
            'headers' => $this->buildUploadMediaHeader($mimeBoundary),
        );

        $response = $this->curl->send($this->getUrl(), $params);

        $obj = json_decode($response['body']);

        if (!$obj || !isset($obj->token_type) || $obj->token_type != 'bearer') {
            $this->findExceptions($response);
        }

        $this->headers = $response['headers'];

        $this->withMedia = null;

        unset($call, $filename, $mimeBoundary, $params, $obj);

        return $this->serializer->format($response['body']);
    }