flawiddsouza/Restfox

Postman Import failing

Closed this issue · 1 comments

          Hi @flawiddsouza, here is error that showed up in the console:

Screenshot Error

I hope it helps!

Originally posted by @Feryhl in #177 (comment)

Hey @kobenguyent, looks like there's a issue in basic auth support that you added for postman import.

It's due to differences in postman v2 and v2.1 exports.

v2.1

{
    "info": {
        "_postman_id": "53f65b96-ea2c-4377-b735-ced3f9e63799",
        "name": "New Collection",
        "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
        "_exporter_id": "37758390"
    },
    "item": [
        {
            "name": "New Request",
            "request": {
                "auth": {
                    "type": "basic",
                    "basic": [
                        {
                            "key": "password",
                            "value": "b",
                            "type": "string"
                        },
                        {
                            "key": "username",
                            "value": "a",
                            "type": "string"
                        }
                    ]
                },
                "method": "GET",
                "header": [],
                "url": {
                    "raw": "test",
                    "host": [
                        "test"
                    ]
                }
            },
            "response": []
        }
    ]
}
"auth": {
    "type": "basic",
    "basic": [
        {
            "key": "password",
            "value": "b",
            "type": "string"
        },
        {
            "key": "username",
            "value": "a",
            "type": "string"
        }
    ]
},

v2.0

{
    "info": {
        "_postman_id": "53f65b96-ea2c-4377-b735-ced3f9e63799",
        "name": "New Collection",
        "schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json",
        "_exporter_id": "37758390"
    },
    "item": [
        {
            "name": "New Request",
            "request": {
                "auth": {
                    "type": "basic",
                    "basic": {
                        "password": "b",
                        "username": "a"
                    }
                },
                "method": "GET",
                "header": [],
                "url": "test"
            },
            "response": []
        }
    ]
}
"auth": {
    "type": "basic",
    "basic": {
        "password": "b",
        "username": "a"
    }
},

Can you look into this please?