(self, url_data, service_id, service_version)
return create_response_object
Returns response_object response json.

        :return: a JSON-serializable dictionary matching the format of the JSON
                 response for fastly_client.create_response_object()
                 ("/service/<service_id>/version/<service_version>/response_object)
                 request.
Returns response_object response json.
Returns response_object response json .
def create_response_object(self, url_data, service_id, service_version):
        """
        Returns response_object response json.

        :return: a JSON-serializable dictionary matching the format of the JSON
                 response for fastly_client.create_response_object()
                 ("/service/<service_id>/version/<service_version>/response_object)
                 request.
        """
        request_dict = {k: v[0] for k, v in url_data}

        create_response_object = {
            "status": request_dict["status"],
            "response": request_dict["response"],
            "cache_condition": request_dict.get("cache_condition", ""),
            "request_condition": request_dict.get("request_condition", ""),
            "name": request_dict["name"],
            "version": service_version,
            "content": request_dict["content"],
            "content_type": "text/plain",
            "service_id": service_id
        }

        if 'response_object_list' not in self.fastly_cache[service_id]:
            self.fastly_cache[service_id]['response_object_list'] = []

        self.fastly_cache[service_id][
            'response_object_list'].append(create_response_object)
        return create_response_object
def create_response_object ( self , url_data , service_id , service_version ) : request_dict = { k : v [ 0 ] for k , v in url_data } create_response_object = { "status" : request_dict [ "status" ] , "response" : request_dict [ "response" ] , "cache_condition" : request_dict . get ( "cache_condition" , "" ) , "request_condition" : request_dict . get ( "request_condition" , "" ) , "name" : request_dict [ "name" ] , "version" : service_version , "content" : request_dict [ "content" ] , "content_type" : "text/plain" , "service_id" : service_id } if 'response_object_list' not in self . fastly_cache [ service_id ] : self . fastly_cache [ service_id ] [ 'response_object_list' ] = [ ] self . fastly_cache [ service_id ] [ 'response_object_list' ] . append ( create_response_object ) return create_response_object