lib/converters/v1.0.0/converter-v1-to-v2.js
function (responseV1) {
        var response = {},
            self = this,
            originalRequest;

        originalRequest = self.savedRequest(responseV1);

        // add ids to the v2 result only if both: the id and retainIds are truthy.
        // this prevents successive exports to v2 from being overwhelmed by id diffs
        self.options.retainIds && (response.id = responseV1.id || util.uid());

        response.name = responseV1.name || 'response';
        response.originalRequest = originalRequest ? self.request(originalRequest) : undefined;
        response.status = responseV1.responseCode && responseV1.responseCode.name || undefined;
        response.code = responseV1.responseCode && responseV1.responseCode.code || undefined;
        response._postman_previewlanguage = responseV1.language;
        response._postman_previewtype = responseV1.previewType;
        response.header = responseV1.headers;
        response.cookie = _.map(responseV1.cookies, function (cookie) {
            return self.cookie(cookie);
        });
        response.responseTime = responseV1.time;
        response.body = responseV1.text;

        return response;
    }
function (responseV1) {
        var response = {},
            self = this,
            originalRequest;

        originalRequest = self.savedRequest(responseV1);

        // add ids to the v2 result only if both: the id and retainIds are truthy.
        // this prevents successive exports to v2 from being overwhelmed by id diffs
        self.options.retainIds && (response.id = responseV1.id || util.uid());

        response.name = responseV1.name || 'response';
        response.originalRequest = originalRequest ? self.request(originalRequest) : undefined;
        response.status = responseV1.responseCode && responseV1.responseCode.name || undefined;
        response.code = responseV1.responseCode && responseV1.responseCode.code || undefined;
        response._postman_previewlanguage = responseV1.language;
        response._postman_previewtype = responseV1.previewType;
        response.header = responseV1.headers;
        response.cookie = _.map(responseV1.cookies, function (cookie) {
            return self.cookie(cookie);
        });
        response.responseTime = responseV1.time;
        response.body = responseV1.text;

        return response;
    }
function ( responseV1 ) { var response = { } , self = this , originalRequest ; originalRequest = self . savedRequest ( responseV1 ) ; // add ids to the v2 result only if both: the id and retainIds are truthy. // this prevents successive exports to v2 from being overwhelmed by id diffs self . options . retainIds && ( response . id = responseV1 . id || util . uid ( ) ) ; response . name = responseV1 . name || 'response' ; response . originalRequest = originalRequest ? self . request ( originalRequest ) : undefined ; response . status = responseV1 . responseCode && responseV1 . responseCode . name || undefined ; response . code = responseV1 . responseCode && responseV1 . responseCode . code || undefined ; response . _postman_previewlanguage = responseV1 . language ; response . _postman_previewtype = responseV1 . previewType ; response . header = responseV1 . headers ; response . cookie = _ . map ( responseV1 . cookies , function ( cookie ) { return self . cookie ( cookie ) ; } ) ; response . responseTime = responseV1 . time ; response . body = responseV1 . text ; return response ; }
Since a V2 response contains the entire associated request that was sent, creating the response means it
also must use the V1 request.

@param {Object} responseV1 - The response object to convert from v1 to v2.
@returns {Object} - The v2 response object.
Since a V2 response contains the entire associated request that was sent creating the response means it also must use the V1 request .