aubm / postmanerator

A HTTP API documentation generator that use Postman collections
MIT License
654 stars 95 forks source link

json: cannot unmarshal array into Go value of type string #16

Closed ghost closed 8 years ago

ghost commented 8 years ago

I got Errors when try to use this with postman collection. I'm using Windows 10 x64.

Here's what I got:

E:\docs>postmanerator.exe -collection E:\docs\PostmanEcho.json.postman_collection Failed to parse collection file: json: cannot unmarshal string into Go value of type struct { URL string "json:\"url\""; Headers []struct { Key string "json:\"key\""; Value string "json:\"value\""; Name string "json:\"name\""; Enabled bool "json:\"enabled\"" } "json:\"headers\""; Data string "json:\"data\""; Method string "json:\"method\""; DataMode string "json:\"dataMode\"" }

aubm commented 8 years ago

Hello, thank you for your interest in the project, can you please attach a copy of the collection file you are attempting to use ?

ghost commented 8 years ago

Of course, here it is. FYI, I've installed Go and set the path and also the root correctly.

{
    "id": "f695cab7-6878-eb55-7943-ad88e1ccfd65",
    "name": "Postman Echo",
    "description": "Postman Echo is service you can use to test your REST clients and make sample API calls. It provides endpoints for `GET`, `POST`, `PUT`, various auth mechanisms and other utility endpoints.\n\nThe documentation for the endpoints as well as example responses can be found at [https://echo.getpostman.com](https://echo.getpostman.com?source=echo-collection-app-onboarding)",
    "order": [],
    "folders": [
        {
            "owner": 0,
            "lastUpdatedBy": "181687",
            "lastRevision": 86088889,
            "id": "e0807fa3-a7cd-4b33-7014-b548b3c54e85",
            "name": "Auth: Digest",
            "description": "Digest authentication protects an endpoint with a username and password without actually transmitting the password over network.\nOne has to apply a hash function (like MD5, etc) to the username and password before sending them over the network.\n\n> Username: `postman`\n>\n> Password: `password`\n\nUnlike Basic-Auth, authentication happens using two consecutive requests where the first request returns `401 Unauthorised` along with `WWW-Authenticate` header containing information that needs to be used to authenticate subsequent calls.\n\nTo know more about digest authentication, refer to the [Digest Access Authentication](https://en.wikipedia.org/wiki/Digest_access_authentication) wikipedia article.\nThe article on [authentication helpers](https://www.getpostman.com/docs/helpers#digest-auth) elaborates how to use the same within the Postman app.",
            "order": [
                "f2bb958e-59cb-405f-bb86-4949a6f5cf6f",
                "a9a0dbd1-c878-3009-5105-3b5d06403fd5"
            ]
        },
        {
            "owner": 0,
            "lastUpdatedBy": "181687",
            "lastRevision": 86088891,
            "id": "62347f6b-1cfe-0c32-f176-080e8c728733",
            "name": "Auth: Others",
            "description": "",
            "order": [
                "d264e04d-a8f7-61d7-02de-0a4f08bc2b9e",
                "bad02d15-506b-dc61-4dcd-b8b77e09d0af"
            ]
        },
        {
            "owner": 0,
            "lastUpdatedBy": "181687",
            "lastRevision": 86088892,
            "id": "8fc8854b-efc8-dc9b-6e91-64ff3dfdec7f",
            "name": "Cookies",
            "description": "The cookie related endpoints allow one to get, set and delete simple cookies.\n\nCookies are small snippets of information that is stored in the browser and sent back to the server with every subsequent requests in order to store useful information between requests.\nIf you want to know more about cookies, read the [HTTP Cookie](https://en.wikipedia.org/wiki/HTTP_cookie) article on wikipedia.",
            "order": [
                "a7de0ecd-9845-4fb8-baf4-22c6488303db",
                "df5d6f0a-afbf-dc9e-303d-a4e858f564a4",
                "124cb847-9d8a-9ffe-5e7b-66de01628069"
            ]
        },
        {
            "owner": 0,
            "lastUpdatedBy": "181687",
            "lastRevision": 86088893,
            "id": "1d62892b-ba8f-692e-f917-6ed10855f103",
            "name": "Headers",
            "description": "The following set of endpoints allow one to see the headers being sent as part of a request and to get a custom set of headers as part of response.\n\nHTTP header fields provide required information about the request or response, or about the object sent in the message body. Both request headers and response headers can be controlled using these endpoints.",
            "order": [
                "0d0d50fb-7171-bad5-a4bb-1dc075d2146b",
                "2864b896-5f90-a2a8-ee7a-012b8416c5c6"
            ]
        },
        {
            "owner": 0,
            "lastUpdatedBy": "181687",
            "lastRevision": 86088894,
            "id": "83e6ac39-bac7-dae3-52ec-65a0819027d5",
            "name": "Request Methods",
            "description": "HTTP has multiple request \"verbs\", such as `GET`, `PUT`, `POST`, `DELETE`,\n`PATCH`, `HEAD`, etc. \n\nAn HTTP Method (verb) defines how a request should be interpreted by a server. \nThe endpoints in this section demonstrate various HTTP Verbs. Postman supports \nall the HTTP Verbs, including some rarely used ones, such as `PROPFIND`, `UNLINK`, \netc.\n\nFor details about HTTP Verbs, refer to [RFC 2616](http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9)\n",
            "order": [
                "436a29f5-17d2-b3c7-b00f-f1e74bb12e9b",
                "7d6dbfa8-6cb1-4ec8-a7d7-fe0e2c306285",
                "bf4ea29e-4885-b3e3-717d-23333123b8b9",
                "030209ae-bd98-09f9-9327-e780a17b448a",
                "5bb91259-517a-6378-a3fa-ecc9e17a7f90"
            ]
        },
        {
            "owner": 0,
            "lastUpdatedBy": "181687",
            "lastRevision": 86088895,
            "id": "716f3aae-e9f9-af22-ccfa-9f9ae89079c8",
            "name": "Utilities",
            "description": "",
            "order": [
                "6de8ccc8-cc2c-fb3e-20cf-f81146547457",
                "dabb3e5b-e947-b7a9-60cb-4bc16d8f4249",
                "8f824818-b1cb-fb0f-2b5b-c82c16d54498",
                "0f98562f-e67c-08fd-4a1f-55cb739ef97e",
                "c7f25a9f-a154-6306-5cf6-50f20d8f03b7",
                "a65deafb-c79e-3a89-d3c9-0678d1d422df"
            ]
        }
    ],
    "timestamp": 0,
    "owner": 0,
    "public": false,
    "hasRequests": true,
    "requests": [
        {
            "folder": "83e6ac39-bac7-dae3-52ec-65a0819027d5",
            "id": "030209ae-bd98-09f9-9327-e780a17b448a",
            "name": "PATCH Request",
            "dataMode": "raw",
            "data": [],
            "descriptionFormat": null,
            "description": "The HTTP `PATCH` method is used to update resources on a server. The exact\nuse of `PATCH` requests depends on the server in question. There are a number\nof server implementations which handle `PATCH` differently. Technically, \n`PATCH` supports both Query String parameters and a Request Body.\n\nThis endpoint accepts an HTTP `PATCH` request and provides debug information\nsuch as the HTTP headers, Query String arguments, and the Request Body.",
            "headers": "",
            "method": "PATCH",
            "pathVariables": {},
            "url": "https://echo.getpostman.com/patch",
            "preRequestScript": "",
            "tests": "tests[\"Body contains files\"] = responseBody.has(\"files\");\ntests[\"Body contains args\"] = responseBody.has(\"args\");\ntests[\"Body contains form\"] = responseBody.has(\"form\");\ntests[\"Body contains headers\"] = responseBody.has(\"headers\");\ntests[\"Body contains url\"] = responseBody.has(\"url\");\n\nvar responseJSON;\n\ntry { responseJSON = JSON.parse(responseBody); }\ncatch (e) { }\n\ntests[\"Data has been passed\"] = (responseJSON && responseJSON.data && responseJSON.data.length)",
            "currentHelper": "normal",
            "helperAttributes": {},
            "collectionId": "f695cab7-6878-eb55-7943-ad88e1ccfd65",
            "rawModeData": "Curabitur auctor, elit nec pulvinar porttitor, ex augue condimentum enim, eget suscipit urna felis quis neque.\nSuspendisse sit amet luctus massa, nec venenatis mi. Suspendisse tincidunt massa at nibh efficitur fringilla. Nam quis congue mi. Etiam volutpat."
        },
        {
            "folder": "1d62892b-ba8f-692e-f917-6ed10855f103",
            "id": "0d0d50fb-7171-bad5-a4bb-1dc075d2146b",
            "name": "Request Headers",
            "dataMode": "params",
            "data": [],
            "rawModeData": null,
            "descriptionFormat": null,
            "description": "A `GET` request to this endpoint returns the list of all request headers as part of the response JSON.\nIn Postman, sending your own set of headers through the [Headers tab](https://www.getpostman.com/docs/requests#headers?source=echo-collection-app-onboarding) will reveal the headers as part of the response.",
            "headers": "my-sample-header: Lorem ipsum dolor sit amet\n",
            "method": "GET",
            "pathVariables": {},
            "url": "https://echo.getpostman.com/headers",
            "preRequestScript": "",
            "tests": "var responseJSON;\ntry {\n    tests[\"Body contains headers\"] = responseBody.has(\"headers\");\n    responseJSON = JSON.parse(responseBody);\n    tests[\"Header contains host\"] = \"host\" in responseJSON.headers;\n    tests[\"Header contains test parameter sent as part of request header\"] = \"my-sample-header\" in responseJSON.headers;\n}\ncatch (e) { }\n\n\n\n",
            "currentHelper": "normal",
            "helperAttributes": {},
            "collectionId": "f695cab7-6878-eb55-7943-ad88e1ccfd65"
        },
        {
            "folder": "716f3aae-e9f9-af22-ccfa-9f9ae89079c8",
            "id": "0f98562f-e67c-08fd-4a1f-55cb739ef97e",
            "name": "Get UTF8 Encoded Response",
            "dataMode": "params",
            "data": [],
            "rawModeData": null,
            "descriptionFormat": null,
            "description": "If a response of an endpoint requires to send data beyond the basic English / ASCII character set, the `charset` parameter in the `Content-Type` response header defines the character encoding policy.\n\nThis endpoint returns an `UTF8` character encoded response body with text in various languages such as Greek, Latin, East Asian, etc. Postman can interpret the character encoding and use appropriate methods to display the character set in responses.",
            "headers": "",
            "method": "GET",
            "pathVariables": {},
            "url": "https://echo.getpostman.com/encoding/utf8",
            "preRequestScript": "",
            "tests": "tests[\"response code is 200\"] = responseCode.code === 200;",
            "currentHelper": "normal",
            "helperAttributes": {},
            "collectionId": "f695cab7-6878-eb55-7943-ad88e1ccfd65"
        },
        {
            "folder": "8fc8854b-efc8-dc9b-6e91-64ff3dfdec7f",
            "id": "124cb847-9d8a-9ffe-5e7b-66de01628069",
            "name": "Get Cookies",
            "dataMode": "params",
            "data": [],
            "rawModeData": null,
            "descriptionFormat": null,
            "description": "Use this endpoint to get a list of all cookies that are stored with respect to this domain. Whatever key-value pairs that has been previously set by calling the \"Set Cookies\" endpoint, will be returned as response JSON.",
            "headers": "",
            "method": "GET",
            "pathVariables": {},
            "url": "https://echo.getpostman.com/cookies",
            "preRequestScript": "",
            "tests": "var responseJSON;\ntry {\n    tests[\"Body contains cookies\"] = responseBody.has(\"cookies\");\n    responseJSON = JSON.parse(responseBody);\n    tests[\"Cookies object is empty\"] = (Object.keys(responseJSON.cookies).length === 0)\n}\ncatch (e) { }\n\ntests[\"Status code is 200\"] = responseCode.code === 200;\n",
            "currentHelper": "normal",
            "helperAttributes": {},
            "collectionId": "f695cab7-6878-eb55-7943-ad88e1ccfd65",
            "responses": [
                {
                    "owner": 0,
                    "lastUpdatedBy": "181687",
                    "lastRevision": 86088911,
                    "request": "4118ca21-f216-410f-510c-2d0e465022c5",
                    "id": "e37f9de5-b4fc-d7b8-32da-b1057c2319bd",
                    "name": "Cookies",
                    "status": "",
                    "responseCode": {
                        "code": 200,
                        "name": "OK"
                    },
                    "time": "462",
                    "headers": [
                        {
                            "name": "Access-Control-Allow-Credentials",
                            "key": "Access-Control-Allow-Credentials",
                            "value": "",
                            "description": ""
                        },
                        {
                            "name": "Access-Control-Allow-Headers",
                            "key": "Access-Control-Allow-Headers",
                            "value": "",
                            "description": ""
                        },
                        {
                            "name": "Access-Control-Allow-Methods",
                            "key": "Access-Control-Allow-Methods",
                            "value": "",
                            "description": ""
                        },
                        {
                            "name": "Access-Control-Allow-Origin",
                            "key": "Access-Control-Allow-Origin",
                            "value": "",
                            "description": ""
                        },
                        {
                            "name": "Connection",
                            "key": "Connection",
                            "value": "keep-alive",
                            "description": ""
                        },
                        {
                            "name": "Content-Encoding",
                            "key": "Content-Encoding",
                            "value": "gzip",
                            "description": ""
                        },
                        {
                            "name": "Content-Length",
                            "key": "Content-Length",
                            "value": "46",
                            "description": ""
                        },
                        {
                            "name": "Content-Type",
                            "key": "Content-Type",
                            "value": "application/json; charset=utf-8",
                            "description": ""
                        },
                        {
                            "name": "Date",
                            "key": "Date",
                            "value": "Thu, 29 Oct 2015 06:16:29 GMT",
                            "description": ""
                        },
                        {
                            "name": "Server",
                            "key": "Server",
                            "value": "nginx/1.6.2",
                            "description": ""
                        },
                        {
                            "name": "Vary",
                            "key": "Vary",
                            "value": "Accept-Encoding",
                            "description": ""
                        },
                        {
                            "name": "X-Powered-By",
                            "key": "X-Powered-By",
                            "value": "Sails <sailsjs.org>",
                            "description": ""
                        }
                    ],
                    "cookies": [],
                    "mime": "",
                    "text": "{\"cookies\":{\"foo2\":\"bar\"}}",
                    "language": "javascript",
                    "rawDataType": "text",
                    "state": {
                        "size": "normal"
                    },
                    "previewType": "html",
                    "searchResultScrolledTo": "-1",
                    "version": null,
                    "requestObject": "\"4118ca21-f216-410f-510c-2d0e465022c5\"",
                    "createdAt": "2015-11-02T13:11:11.000Z",
                    "updatedAt": "2015-11-23T07:07:08.000Z",
                    "write": true
                }
            ]
        },
        {
            "folder": "1d62892b-ba8f-692e-f917-6ed10855f103",
            "id": "2864b896-5f90-a2a8-ee7a-012b8416c5c6",
            "name": "Response Headers",
            "dataMode": "params",
            "data": [],
            "rawModeData": null,
            "descriptionFormat": null,
            "description": "This endpoint causes the server to send custom set of response headers. Providing header values as part of the URL parameters of a `GET` request to this endpoint returns the same as part of response header.\n\nTo send your own set of headers, simply add or replace the the URL parameters with your own set.",
            "headers": "",
            "method": "GET",
            "pathVariables": {},
            "url": "https://echo.getpostman.com/response-headers?Content-Type=text/html&test=response_headers",
            "preRequestScript": "",
            "tests": "tests[\"Body contains Content-Type\"] = responseBody.has(\"Content-Type\");\ntests[\"response headers have key sent as part of request\"] = (postman.getResponseHeader('test') == 'response_headers')",
            "currentHelper": "normal",
            "helperAttributes": {},
            "collectionId": "f695cab7-6878-eb55-7943-ad88e1ccfd65"
        },
        {
            "folder": "83e6ac39-bac7-dae3-52ec-65a0819027d5",
            "id": "436a29f5-17d2-b3c7-b00f-f1e74bb12e9b",
            "name": "GET Request",
            "dataMode": "params",
            "data": [],
            "rawModeData": null,
            "descriptionFormat": null,
            "description": "The HTTP `GET` request method is meant to retrieve data from a server. The data\nis identified by a unique URI (Uniform Resource Identifier). \n\nA `GET` request can pass parameters to the server using \"Query String \nParameters\". For example, in the following request,\n\n> http://example.com/hi/there?hand=wave\n\nThe parameter \"hand\" has the value \"wave\".\n\nThis endpoint echoes the HTTP headers, request parameters and the complete\nURI requested.",
            "headers": "",
            "method": "GET",
            "pathVariables": {},
            "url": "https://echo.getpostman.com/get?test=123",
            "preRequestScript": "",
            "tests": "tests[\"Body contains headers\"] = responseBody.has(\"headers\");\ntests[\"Body contains args\"] = responseBody.has(\"args\");\ntests[\"Body contains url\"] = responseBody.has(\"url\");\n\nvar responseJSON;\n\ntry { responseJSON = JSON.parse(responseBody); }\ncatch (e) { }\n\n\ntests[\"Args key contains argument passed as url parameter\"] = 'test' in responseJSON.args",
            "currentHelper": "normal",
            "helperAttributes": {},
            "collectionId": "f695cab7-6878-eb55-7943-ad88e1ccfd65"
        },
        {
            "folder": "83e6ac39-bac7-dae3-52ec-65a0819027d5",
            "id": "5bb91259-517a-6378-a3fa-ecc9e17a7f90",
            "name": "DELETE Request",
            "dataMode": "raw",
            "data": [],
            "descriptionFormat": null,
            "description": "The HTTP `DELETE` method is used to delete resources on a server. The exact\nuse of `DELETE` requests depends on the server implementation. In general, \n`DELETE` requests support both, Query String parameters as well as a Request \nBody.\n\nThis endpoint accepts an HTTP `DELETE` request and provides debug information\nsuch as the HTTP headers, Query String arguments, and the Request Body.",
            "headers": "",
            "method": "DELETE",
            "pathVariables": {},
            "url": "https://echo.getpostman.com/delete",
            "preRequestScript": "",
            "tests": "tests[\"Body contains files\"] = responseBody.has(\"files\");\ntests[\"Body contains args\"] = responseBody.has(\"args\");\ntests[\"Body contains form\"] = responseBody.has(\"form\");\ntests[\"Body contains headers\"] = responseBody.has(\"headers\");\ntests[\"Body contains url\"] = responseBody.has(\"url\");\n\nvar responseJSON;\n\ntry { responseJSON = JSON.parse(responseBody); }\ncatch (e) { }\n\ntests[\"Data has been passed\"] = (responseJSON && responseJSON.data && responseJSON.data.length)",
            "currentHelper": "normal",
            "helperAttributes": {},
            "collectionId": "f695cab7-6878-eb55-7943-ad88e1ccfd65",
            "rawModeData": "Donec fermentum, nisi sed cursus eleifend, nulla tortor ultricies tellus, ut vehicula orci arcu ut velit. In volutpat egestas dapibus. \nMorbi condimentum vestibulum sapien. Etiam dignissim diam quis eros lobortis gravida vel lobortis est. Etiam gravida sed."
        },
        {
            "folder": "716f3aae-e9f9-af22-ccfa-9f9ae89079c8",
            "id": "6de8ccc8-cc2c-fb3e-20cf-f81146547457",
            "name": "Response Status Code",
            "dataMode": "params",
            "data": [],
            "rawModeData": null,
            "descriptionFormat": null,
            "description": "This endpoint allows one to instruct the server which status code to respond with.\n\nEvery response is accompanied by a status code. The status code provides a summary of the nature of response sent by the server. For example, a status code of `200` means everything is okay with the response and a code of `404` implies that the requested URL does not exist on server. \nA list of all valid HTTP status code can be found at the [List of Status Codes](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes) wikipedia article. When using Postman, the response status code is described for easy reference.\n\nNote that if an invalid status code is requested to be sent, the server returns a status code of `400 Bad Request`.",
            "headers": "",
            "method": "GET",
            "pathVariables": {},
            "url": "https://echo.getpostman.com/status/200",
            "preRequestScript": "",
            "tests": "var responseJSON;\ntry {\n    responseJSON = JSON.parse(responseBody); \n    tests[\"Status equals 200\"] = responseJSON.status === 200;\n}\ncatch (e) { }\ntests[\"Body contains status\"] = responseBody.has(\"status\");\n\n",
            "currentHelper": "normal",
            "helperAttributes": {},
            "collectionId": "f695cab7-6878-eb55-7943-ad88e1ccfd65"
        },
        {
            "folder": "83e6ac39-bac7-dae3-52ec-65a0819027d5",
            "id": "7d6dbfa8-6cb1-4ec8-a7d7-fe0e2c306285",
            "name": "POST Request",
            "dataMode": "raw",
            "data": [],
            "descriptionFormat": null,
            "description": "The HTTP `POST` request method is meant to transfer data to a server \n(and elicit a response). What data is returned depends on the implementation\nof the server.\n\nA `POST` request can pass parameters to the server using \"Query String \nParameters\", as well as the Request Body. For example, in the following request,\n\n> POST /hi/there?hand=wave\n>\n> <request-body>\n\nThe parameter \"hand\" has the value \"wave\". The request body can be in multiple\nformats. These formats are defined by the MIME type of the request. The MIME \nType can be set using the ``Content-Type`` HTTP header. The most commonly used \nMIME types are:\n\n* `multipart/form-data`\n* `application/x-www-form-urlencoded`\n* `application/json`\n\nThis endpoint echoes the HTTP headers, request parameters, the contents of\nthe request body and the complete URI requested.",
            "headers": "Content-Type: text/plain\n",
            "method": "POST",
            "pathVariables": {},
            "url": "https://echo.getpostman.com/post",
            "preRequestScript": "",
            "tests": "var responseJSON;\n\ntry { responseJSON = JSON.parse(responseBody); }\ncatch (e) { }\n\n\ntests[\"response has data\"] = responseJSON && responseJSON.data && (responseJSON.data.length === 256);\ntests[\"content-type equals text/plain\"] = responseJSON && responseJSON.headers && (responseJSON.headers[\"content-type\"] === 'text/plain');",
            "currentHelper": "normal",
            "helperAttributes": {},
            "collectionId": "f695cab7-6878-eb55-7943-ad88e1ccfd65",
            "rawModeData": "Duis posuere augue vel cursus pharetra. In luctus a ex nec pretium. Praesent neque quam, tincidunt nec leo eget, rutrum vehicula magna.\nMaecenas consequat elementum elit, id semper sem tristique et. Integer pulvinar enim quis consectetur interdum volutpat."
        },
        {
            "folder": "716f3aae-e9f9-af22-ccfa-9f9ae89079c8",
            "id": "8f824818-b1cb-fb0f-2b5b-c82c16d54498",
            "name": "Delay Response",
            "dataMode": "params",
            "data": [],
            "rawModeData": null,
            "descriptionFormat": null,
            "description": "Using this endpoint one can configure how long it takes for the server to come back with a response. Appending a number to the URL defines the time (in seconds) the server will wait before responding.\n\nNote that a maximum delay of 10 seconds is accepted by the server.",
            "headers": "",
            "method": "GET",
            "pathVariables": {},
            "url": "https://echo.getpostman.com/delay/3",
            "preRequestScript": "",
            "tests": "var responseJSON;\ntry { \n    responseJSON = JSON.parse(responseBody); \n    tests[\"response body has key delay\"] = 'delay' in responseJSON;\n}\ncatch (e) { }\ntests[\"response code is 200\"] = responseCode.code === 200;\n",
            "currentHelper": "normal",
            "helperAttributes": {},
            "collectionId": "f695cab7-6878-eb55-7943-ad88e1ccfd65"
        },
        {
            "folder": "716f3aae-e9f9-af22-ccfa-9f9ae89079c8",
            "id": "a65deafb-c79e-3a89-d3c9-0678d1d422df",
            "name": "Deflate Compressed Response",
            "dataMode": "params",
            "data": [],
            "rawModeData": null,
            "descriptionFormat": null,
            "description": "This endpoint returns the response using [deflate compression algoritm](https://en.wikipedia.org/wiki/DEFLATE). \nThe uncompressed response is a JSON string containing the details of the request sent by the client. For this endpoint to work, one should request with `Accept-encoding` header containing `deflate` as part of its value. Postman supports gzip, deflate and SDCH decoding and automatically sends them as part of the request.\n\nHTTP Compression allows the server to send responses in a compressed format, which is uncompressed by the client before processing. This reduces network bandwidth consumption at the cost of increase in CPU usage.\nTo know more about this, refer the [HTTP Compression](https://en.wikipedia.org/wiki/HTTP_compression) wikipedia article.",
            "headers": "",
            "method": "GET",
            "pathVariables": {},
            "url": "https://echo.getpostman.com/deflate",
            "preRequestScript": "",
            "tests": "tests[\"response code is 200\"] = responseCode.code === 200;\n\ntry {\n    var data = JSON.parse(responseBody);\n    tests[\"Body contains deflated\"] = responseBody.has(\"deflated\");\n    tests[\"Body contains headers\"] = responseBody.has(\"headers\");\n    tests[\"Body contains method\"] = responseBody.has(\"method\");\n}\ncatch(e) {\n    console.log('Cannot parse response,probably not a JSON');\n}\n",
            "currentHelper": "normal",
            "helperAttributes": {},
            "collectionId": "f695cab7-6878-eb55-7943-ad88e1ccfd65"
        },
        {
            "folder": "8fc8854b-efc8-dc9b-6e91-64ff3dfdec7f",
            "id": "a7de0ecd-9845-4fb8-baf4-22c6488303db",
            "name": "Set Cookies",
            "dataMode": "params",
            "data": [],
            "rawModeData": null,
            "descriptionFormat": null,
            "description": "The cookie setter endpoint accepts a list of cookies and their values as part of URL parameters of a `GET` request. These cookies are saved and can be subsequently retrieved or deleted. The response of this request returns a JSON with all cookies listed.\n\nTo set your own set of cookies, simply replace the URL parameters \"foo1=bar1&foo2=bar2\" with your own set of key-value pairs.",
            "headers": "",
            "method": "GET",
            "pathVariables": {},
            "url": "https://echo.getpostman.com/cookies/set?foo1=bar1&foo2=bar2",
            "preRequestScript": "",
            "tests": "var responseJSON;\ntry {\n    tests[\"Body contains cookies\"] = responseBody.has(\"cookies\");\n    responseJSON = JSON.parse(responseBody);\n    tests[\"Body contains cookie foo1\"] = 'foo1' in responseJSON.cookies;\n    tests[\"Body contains cookie foo2\"] = 'foo2' in responseJSON.cookies;    \n}\ncatch (e) { }\n\ntests[\"Status code is 200\"] = responseCode.code === 200;\n\n",
            "currentHelper": "normal",
            "helperAttributes": {},
            "collectionId": "f695cab7-6878-eb55-7943-ad88e1ccfd65",
            "responses": [
                {
                    "owner": 0,
                    "lastUpdatedBy": "181687",
                    "lastRevision": 86088924,
                    "request": "96a24790-4951-ba7e-aa4f-fb40a45a7fcb",
                    "id": "9e0d78a5-2061-90df-42ba-afc703dd4752",
                    "name": "Cookies",
                    "status": "",
                    "responseCode": {
                        "code": 200,
                        "name": "OK"
                    },
                    "time": "3063",
                    "headers": [
                        {
                            "name": "Access-Control-Allow-Credentials",
                            "key": "Access-Control-Allow-Credentials",
                            "value": "",
                            "description": ""
                        },
                        {
                            "name": "Access-Control-Allow-Headers",
                            "key": "Access-Control-Allow-Headers",
                            "value": "",
                            "description": ""
                        },
                        {
                            "name": "Access-Control-Allow-Methods",
                            "key": "Access-Control-Allow-Methods",
                            "value": "",
                            "description": ""
                        },
                        {
                            "name": "Access-Control-Allow-Origin",
                            "key": "Access-Control-Allow-Origin",
                            "value": "",
                            "description": ""
                        },
                        {
                            "name": "Connection",
                            "key": "Connection",
                            "value": "keep-alive",
                            "description": ""
                        },
                        {
                            "name": "Content-Encoding",
                            "key": "Content-Encoding",
                            "value": "gzip",
                            "description": ""
                        },
                        {
                            "name": "Content-Length",
                            "key": "Content-Length",
                            "value": "51",
                            "description": ""
                        },
                        {
                            "name": "Content-Type",
                            "key": "Content-Type",
                            "value": "application/json; charset=utf-8",
                            "description": ""
                        },
                        {
                            "name": "Date",
                            "key": "Date",
                            "value": "Thu, 29 Oct 2015 06:15:28 GMT",
                            "description": ""
                        },
                        {
                            "name": "Server",
                            "key": "Server",
                            "value": "nginx/1.6.2",
                            "description": ""
                        },
                        {
                            "name": "Vary",
                            "key": "Vary",
                            "value": "Accept-Encoding",
                            "description": ""
                        },
                        {
                            "name": "X-Powered-By",
                            "key": "X-Powered-By",
                            "value": "Sails <sailsjs.org>",
                            "description": ""
                        }
                    ],
                    "cookies": [],
                    "mime": "",
                    "text": "{\"cookies\":{\"foo1\":\"bar\",\"foo2\":\"bar\"}}",
                    "language": "javascript",
                    "rawDataType": "text",
                    "state": {
                        "size": "normal"
                    },
                    "previewType": "html",
                    "searchResultScrolledTo": "-1",
                    "version": null,
                    "requestObject": "\"96a24790-4951-ba7e-aa4f-fb40a45a7fcb\"",
                    "createdAt": "2015-11-02T13:11:12.000Z",
                    "updatedAt": "2015-11-23T07:07:09.000Z",
                    "write": true
                }
            ]
        },
        {
            "folder": "e0807fa3-a7cd-4b33-7014-b548b3c54e85",
            "id": "a9a0dbd1-c878-3009-5105-3b5d06403fd5",
            "name": "DigestAuth Success",
            "dataMode": "params",
            "data": [],
            "rawModeData": null,
            "descriptionFormat": null,
            "description": "This endpoint sends a hashed Digest Authorization header to gain access to a valid `200 Ok` response code. In Postman, it uses the stored [global variables](https://www.getpostman.com/docs/environments#gloval-variables?source=echo-collection-app-onboarding), `echo_digest_realm` and `echo_digest_nonce`, to generate the hashed authorisation header.\n\nWithin Postman, for this request to successfully authenticate, running the previous request \"DigestAuth Request\" stores the relevant information within the global variables.",
            "headers": "Authorization: Digest username=\"postman\", realm=\"Users\", nonce=\"ni1LiL0O37PRRhofWdCLmwFsnEtH1lew\", uri=\"/digest-auth\", response=\"254679099562cf07df9b6f5d8d15db44\", opaque=\"\"\n",
            "method": "GET",
            "pathVariables": {},
            "url": "https://echo.getpostman.com/digest-auth",
            "preRequestScript": "",
            "tests": "tests[\"response code is 200\"] = responseCode.code === 200;\ntests[\"body contains authenticated\"] = responseBody.has(\"authenticated\");",
            "currentHelper": "digestAuth",
            "helperAttributes": {
                "id": "digest",
                "time": 1446551845396,
                "algorithm": "MD5",
                "username": "postman",
                "realm": "{{echo_digest_realm}}",
                "password": "password",
                "nonce": "{{echo_digest_nonce}}",
                "nonceCount": "",
                "clientNonce": "",
                "opaque": "",
                "qop": "",
                "saveToRequest": true
            },
            "collectionId": "f695cab7-6878-eb55-7943-ad88e1ccfd65",
            "responses": [
                {
                    "owner": 0,
                    "lastUpdatedBy": "181687",
                    "lastRevision": 86088929,
                    "request": "eecb504e-1736-d34c-990a-b86d36f06ddd",
                    "id": "441a9d57-781e-fc2d-ca61-c10effb1792a",
                    "name": "200",
                    "status": "",
                    "responseCode": {
                        "code": 200,
                        "name": "OK"
                    },
                    "time": "9843",
                    "headers": [
                        {
                            "name": "Access-Control-Allow-Credentials",
                            "key": "Access-Control-Allow-Credentials",
                            "value": "",
                            "description": ""
                        },
                        {
                            "name": "Access-Control-Allow-Headers",
                            "key": "Access-Control-Allow-Headers",
                            "value": "",
                            "description": ""
                        },
                        {
                            "name": "Access-Control-Allow-Methods",
                            "key": "Access-Control-Allow-Methods",
                            "value": "",
                            "description": ""
                        },
                        {
                            "name": "Access-Control-Allow-Origin",
                            "key": "Access-Control-Allow-Origin",
                            "value": "",
                            "description": ""
                        },
                        {
                            "name": "Connection",
                            "key": "Connection",
                            "value": "keep-alive",
                            "description": ""
                        },
                        {
                            "name": "Content-Encoding",
                            "key": "Content-Encoding",
                            "value": "gzip",
                            "description": ""
                        },
                        {
                            "name": "Content-Length",
                            "key": "Content-Length",
                            "value": "42",
                            "description": ""
                        },
                        {
                            "name": "Content-Type",
                            "key": "Content-Type",
                            "value": "application/json; charset=utf-8",
                            "description": ""
                        },
                        {
                            "name": "Date",
                            "key": "Date",
                            "value": "Thu, 29 Oct 2015 06:17:51 GMT",
                            "description": ""
                        },
                        {
                            "name": "Server",
                            "key": "Server",
                            "value": "nginx/1.6.2",
                            "description": ""
                        },
                        {
                            "name": "Vary",
                            "key": "Vary",
                            "value": "Accept-Encoding",
                            "description": ""
                        },
                        {
                            "name": "X-Powered-By",
                            "key": "X-Powered-By",
                            "value": "Sails <sailsjs.org>",
                            "description": ""
                        }
                    ],
                    "cookies": [],
                    "mime": "",
                    "text": "{\"authenticated\":true}",
                    "language": "javascript",
                    "rawDataType": "text",
                    "state": {
                        "size": "normal"
                    },
                    "previewType": "html",
                    "searchResultScrolledTo": "-1",
                    "version": null,
                    "requestObject": "\"eecb504e-1736-d34c-990a-b86d36f06ddd\"",
                    "createdAt": "2015-11-02T13:11:09.000Z",
                    "updatedAt": "2015-11-23T07:07:09.000Z",
                    "write": true
                },
                {
                    "owner": 0,
                    "lastUpdatedBy": "181687",
                    "lastRevision": 86088928,
                    "request": "eecb504e-1736-d34c-990a-b86d36f06ddd",
                    "id": "ad3e7633-eb93-8bae-d993-d5974cbde1f9",
                    "name": "200",
                    "status": "",
                    "responseCode": {
                        "code": 200,
                        "name": "OK"
                    },
                    "time": "9843",
                    "headers": [
                        {
                            "name": "Access-Control-Allow-Credentials",
                            "key": "Access-Control-Allow-Credentials",
                            "value": "",
                            "description": ""
                        },
                        {
                            "name": "Access-Control-Allow-Headers",
                            "key": "Access-Control-Allow-Headers",
                            "value": "",
                            "description": ""
                        },
                        {
                            "name": "Access-Control-Allow-Methods",
                            "key": "Access-Control-Allow-Methods",
                            "value": "",
                            "description": ""
                        },
                        {
                            "name": "Access-Control-Allow-Origin",
                            "key": "Access-Control-Allow-Origin",
                            "value": "",
                            "description": ""
                        },
                        {
                            "name": "Connection",
                            "key": "Connection",
                            "value": "keep-alive",
                            "description": ""
                        },
                        {
                            "name": "Content-Encoding",
                            "key": "Content-Encoding",
                            "value": "gzip",
                            "description": ""
                        },
                        {
                            "name": "Content-Length",
                            "key": "Content-Length",
                            "value": "42",
                            "description": ""
                        },
                        {
                            "name": "Content-Type",
                            "key": "Content-Type",
                            "value": "application/json; charset=utf-8",
                            "description": ""
                        },
                        {
                            "name": "Date",
                            "key": "Date",
                            "value": "Thu, 29 Oct 2015 06:17:51 GMT",
                            "description": ""
                        },
                        {
                            "name": "Server",
                            "key": "Server",
                            "value": "nginx/1.6.2",
                            "description": ""
                        },
                        {
                            "name": "Vary",
                            "key": "Vary",
                            "value": "Accept-Encoding",
                            "description": ""
                        },
                        {
                            "name": "X-Powered-By",
                            "key": "X-Powered-By",
                            "value": "Sails <sailsjs.org>",
                            "description": ""
                        }
                    ],
                    "cookies": [],
                    "mime": "",
                    "text": "{\"authenticated\":true}",
                    "language": "javascript",
                    "rawDataType": "text",
                    "state": {
                        "size": "normal"
                    },
                    "previewType": "html",
                    "searchResultScrolledTo": "-1",
                    "version": null,
                    "requestObject": "\"eecb504e-1736-d34c-990a-b86d36f06ddd\"",
                    "createdAt": "2015-11-02T13:11:09.000Z",
                    "updatedAt": "2015-11-23T07:07:09.000Z",
                    "write": true
                }
            ]
        },
        {
            "folder": "62347f6b-1cfe-0c32-f176-080e8c728733",
            "id": "bad02d15-506b-dc61-4dcd-b8b77e09d0af",
            "name": "OAuth1.0 Verify Signature",
            "dataMode": "params",
            "data": [
                {
                    "key": "code",
                    "value": "xWnkliVQJURqB2x1",
                    "type": "text",
                    "enabled": true
                },
                {
                    "key": "grant_type",
                    "value": "authorization_code",
                    "type": "text",
                    "enabled": true
                },
                {
                    "key": "redirect_uri",
                    "value": "https://www.getpostman.com/oauth2/callback",
                    "type": "text",
                    "enabled": true
                },
                {
                    "key": "client_id",
                    "value": "abc123",
                    "type": "text",
                    "enabled": true
                },
                {
                    "key": "client_secret",
                    "value": "ssh-secret",
                    "type": "text",
                    "enabled": true
                }
            ],
            "rawModeData": null,
            "descriptionFormat": null,
            "description": "OAuth1.0a is a specification that defines a protocol that can be used by one\nservice to access \"protected\" resources (endpoints) on another service. A\nmajor part of OAuth1.0 is HTTP Request Signing. This endpoint allows you to \ncheck whether the request calculation works properly in the client. \n\nThe endpoint supports the HTTP ``Authorization`` header. In case the signature\nverification fails, the endpoint provides the four debug values,\n\n* ``base_uri``\n* ``normalized_param_string``\n* ``base_string``\n* ``signing_key``\n\nFor more details about these parameters, check the [OAuth1.0a Specification](http://oauth.net/core/1.0a/)\n\nIn order to use this endpoint, you can set the following values:\n\n> Consumer Key: ``RKCGzna7bv9YD57c``\n>\n> Consumer Secret: ``D+EdQ-gs$-%@2Nu7``\n\nIf you are using Postman, also check the \"Add params to header\" and \n\"Auto add parameters\" boxes.",
            "headers": "Authorization: OAuth oauth_consumer_key=\"RKCGzna7bv9YD57c\",oauth_signature_method=\"HMAC-SHA1\",oauth_timestamp=\"1442394747\",oauth_nonce=\"UIGipk\",oauth_version=\"1.0\",oauth_signature=\"CaeyGPr2mns1WCq4Cpm5aLvz6Gs=\"\n",
            "method": "GET",
            "pathVariables": {},
            "url": "https://echo.getpostman.com/oauth1",
            "preRequestScript": "",
            "tests": "tests[\"response code is 200\"] = responseCode.code === 200;\nvar body = JSON.parse(responseBody);\ntests[\"Body contains status pass\"] = body[\"status\"] == \"pass\"",
            "currentHelper": "normal",
            "helperAttributes": {},
            "collectionId": "f695cab7-6878-eb55-7943-ad88e1ccfd65"
        },
        {
            "folder": "83e6ac39-bac7-dae3-52ec-65a0819027d5",
            "id": "bf4ea29e-4885-b3e3-717d-23333123b8b9",
            "name": "PUT Request",
            "dataMode": "raw",
            "data": [],
            "descriptionFormat": null,
            "description": "The HTTP `PUT` request method is similar to HTTP `POST`. It too is meant to \ntransfer data to a server (and elicit a response). What data is returned depends on the implementation\nof the server.\n\nA `PUT` request can pass parameters to the server using \"Query String \nParameters\", as well as the Request Body. For example, in the following \nraw HTTP request,\n\n> PUT /hi/there?hand=wave\n>\n> <request-body>\n\n\n",
            "headers": "",
            "method": "PUT",
            "pathVariables": {},
            "url": "https://echo.getpostman.com/put",
            "preRequestScript": "",
            "tests": "var data;\n\ntry { responseJSON = JSON.parse(responseBody); }\ncatch (e) {}\n\ntests[\"Body contains files\"] = responseBody.has(\"files\");\ntests[\"Body contains args\"] = responseBody.has(\"args\");\ntests[\"Body contains form\"] = responseBody.has(\"form\");\ntests[\"Body contains headers\"] = responseBody.has(\"headers\");\ntests[\"Body contains url\"] = responseBody.has(\"url\");\n\n\n\ntests[\"Data has been passed\"] = (responseJSON && responseJSON.data && responseJSON.data.length)",
            "currentHelper": "normal",
            "helperAttributes": {},
            "collectionId": "f695cab7-6878-eb55-7943-ad88e1ccfd65",
            "rawModeData": "Etiam mi lacus, cursus vitae felis et, blandit pellentesque neque. Vestibulum eget nisi a tortor commodo dignissim.\nQuisque ipsum ligula, faucibus a felis a, commodo elementum nisl. Mauris vulputate sapien et tincidunt viverra. Donec vitae velit nec metus."
        },
        {
            "folder": "716f3aae-e9f9-af22-ccfa-9f9ae89079c8",
            "id": "c7f25a9f-a154-6306-5cf6-50f20d8f03b7",
            "name": "GZip Compressed Response",
            "dataMode": "params",
            "data": [],
            "rawModeData": null,
            "descriptionFormat": null,
            "description": "This endpoint returns the response using [gzip compression algoritm](https://en.wikipedia.org/wiki/Gzip).\nThe uncompressed response is a JSON string containing the details of the request sent by the client. For this endpoint to work, one should request with `Accept-encoding` header containing `gzip` as part of its value. Postman supports gzip, deflate and SDCH decoding and automatically sends them as part of the request.\n\nHTTP Compression allows the server to send responses in a compressed format, which is uncompressed by the client before processing. This reduces network bandwidth consumption at the cost of increase in CPU usage.\nTo know more about this, refer the [HTTP Compression](https://en.wikipedia.org/wiki/HTTP_compression) wikipedia article.",
            "headers": "",
            "method": "GET",
            "pathVariables": {},
            "url": "https://echo.getpostman.com/gzip",
            "preRequestScript": "",
            "tests": "try {\n    var data = JSON.parse(responseBody);\n    tests[\"Body contains gzipped\"] = responseBody.has(\"gzipped\");\n    tests[\"Body contains headers\"] = responseBody.has(\"headers\");\n    tests[\"Body contains method\"] = responseBody.has(\"method\");\n}\ncatch(e) {\n    console.log('Cannot parse response,probably not a JSON');\n}\ntests[\"response code is 200\"] = responseCode.code === 200;",
            "currentHelper": "normal",
            "helperAttributes": {},
            "collectionId": "f695cab7-6878-eb55-7943-ad88e1ccfd65"
        },
        {
            "folder": "62347f6b-1cfe-0c32-f176-080e8c728733",
            "id": "d264e04d-a8f7-61d7-02de-0a4f08bc2b9e",
            "name": "Basic Auth",
            "dataMode": "params",
            "data": [],
            "rawModeData": null,
            "descriptionFormat": null,
            "description": "This endpoint simulates a **basic-auth** protected endpoint. \nThe endpoint accepts a default username and password and returns a status code of `200 ok` only if the same is provided. \nOtherwise it will return a status code `401 unauthorized`.\n\n> Username: `postman`\n> \n> Password: `password`\n\nTo use this endpoint, send a request with the header `Authorization: Basic cG9zdG1hbjpwYXNzd29yZA==`. \nThe cryptic latter half of the header value is a base64 encoded concatenation of the default username and password. \nUsing Postman, to send this request, you can simply fill in the username and password in the \"Authorization\" tab and Postman will do the rest for you.\n\nTo know more about basic authentication, refer to the [Basic Access Authentication](https://en.wikipedia.org/wiki/Basic_access_authentication) wikipedia article.\nThe article on [authentication helpers](https://www.getpostman.com/docs/helpers#basic-auth?source=echo-collection-app-onboarding) elaborates how to use the same within the Postman app.",
            "headers": "Authorization: Basic cG9zdG1hbjpwYXNzd29yZA==\n",
            "method": "GET",
            "pathVariables": {},
            "url": "https://echo.getpostman.com/basic-auth",
            "preRequestScript": "",
            "tests": "tests[\"response code is 200\"] = responseCode.code === 200;\ntests[\"Body contains authenticated\"] = responseBody.has(\"authenticated\");",
            "currentHelper": "basicAuth",
            "helperAttributes": {
                "username": "postman",
                "password": "password",
                "saveToRequest": true,
                "id": "basic",
                "timestamp": 1441099408703
            },
            "collectionId": "f695cab7-6878-eb55-7943-ad88e1ccfd65",
            "responses": [
                {
                    "owner": 0,
                    "lastUpdatedBy": "181687",
                    "lastRevision": 86088939,
                    "request": "ef90671a-ab14-16f5-0a57-41b32fc2a36f",
                    "id": "b15a0237-2e6d-c172-57c1-b0262c781c06",
                    "name": "200",
                    "status": "",
                    "responseCode": {
                        "code": 200,
                        "name": "OK"
                    },
                    "time": "377",
                    "headers": [
                        {
                            "name": "Access-Control-Allow-Credentials",
                            "key": "Access-Control-Allow-Credentials",
                            "value": "",
                            "description": ""
                        },
                        {
                            "name": "Access-Control-Allow-Headers",
                            "key": "Access-Control-Allow-Headers",
                            "value": "",
                            "description": ""
                        },
                        {
                            "name": "Access-Control-Allow-Methods",
                            "key": "Access-Control-Allow-Methods",
                            "value": "",
                            "description": ""
                        },
                        {
                            "name": "Access-Control-Allow-Origin",
                            "key": "Access-Control-Allow-Origin",
                            "value": "",
                            "description": ""
                        },
                        {
                            "name": "Connection",
                            "key": "Connection",
                            "value": "keep-alive",
                            "description": ""
                        },
                        {
                            "name": "Content-Encoding",
                            "key": "Content-Encoding",
                            "value": "gzip",
                            "description": ""
                        },
                        {
                            "name": "Content-Length",
                            "key": "Content-Length",
                            "value": "42",
                            "description": ""
                        },
                        {
                            "name": "Content-Type",
                            "key": "Content-Type",
                            "value": "application/json; charset=utf-8",
                            "description": ""
                        },
                        {
                            "name": "Date",
                            "key": "Date",
                            "value": "Sat, 31 Oct 2015 06:38:25 GMT",
                            "description": ""
                        },
                        {
                            "name": "Server",
                            "key": "Server",
                            "value": "nginx/1.6.2",
                            "description": ""
                        },
                        {
                            "name": "Vary",
                            "key": "Vary",
                            "value": "Accept-Encoding",
                            "description": ""
                        },
                        {
                            "name": "X-Powered-By",
                            "key": "X-Powered-By",
                            "value": "Sails <sailsjs.org>",
                            "description": ""
                        }
                    ],
                    "cookies": [],
                    "mime": "",
                    "text": "{\"authenticated\":true}",
                    "language": "javascript",
                    "rawDataType": "text",
                    "state": {
                        "size": "normal"
                    },
                    "previewType": "html",
                    "searchResultScrolledTo": "-1",
                    "version": null,
                    "requestObject": "\"ef90671a-ab14-16f5-0a57-41b32fc2a36f\"",
                    "createdAt": "2015-11-02T13:11:09.000Z",
                    "updatedAt": "2015-11-23T07:07:10.000Z",
                    "write": true
                },
                {
                    "owner": 0,
                    "lastUpdatedBy": "181687",
                    "lastRevision": 86088938,
                    "request": "ef90671a-ab14-16f5-0a57-41b32fc2a36f",
                    "id": "f44b8639-85b3-89d7-292a-51f813e3b417",
                    "name": "401",
                    "status": "",
                    "responseCode": {
                        "code": 401,
                        "name": "Unauthorized"
                    },
                    "time": "276",
                    "headers": [
                        {
                            "name": "Access-Control-Allow-Credentials",
                            "key": "Access-Control-Allow-Credentials",
                            "value": "",
                            "description": ""
                        },
                        {
                            "name": "Access-Control-Allow-Headers",
                            "key": "Access-Control-Allow-Headers",
                            "value": "",
                            "description": ""
                        },
                        {
                            "name": "Access-Control-Allow-Methods",
                            "key": "Access-Control-Allow-Methods",
                            "value": "",
                            "description": ""
                        },
                        {
                            "name": "Access-Control-Allow-Origin",
                            "key": "Access-Control-Allow-Origin",
                            "value": "",
                            "description": ""
                        },
                        {
                            "name": "Connection",
                            "key": "Connection",
                            "value": "keep-alive",
                            "description": ""
                        },
                        {
                            "name": "Date",
                            "key": "Date",
                            "value": "Sat, 31 Oct 2015 06:38:51 GMT",
                            "description": ""
                        },
                        {
                            "name": "Server",
                            "key": "Server",
                            "value": "nginx/1.6.2",
                            "description": ""
                        },
                        {
                            "name": "WWW-Authenticate",
                            "key": "WWW-Authenticate",
                            "value": "Basic realm=\"Users\"",
                            "description": ""
                        },
                        {
                            "name": "X-Powered-By",
                            "key": "X-Powered-By",
                            "value": "Sails <sailsjs.org>",
                            "description": ""
                        },
                        {
                            "name": "transfer-encoding",
                            "key": "transfer-encoding",
                            "value": "chunked",
                            "description": ""
                        }
                    ],
                    "cookies": [],
                    "mime": "",
                    "text": "Unauthorized",
                    "language": "html",
                    "rawDataType": "text",
                    "state": {
                        "size": "normal"
                    },
                    "previewType": "html",
                    "searchResultScrolledTo": "-1",
                    "version": null,
                    "requestObject": "\"ef90671a-ab14-16f5-0a57-41b32fc2a36f\"",
                    "createdAt": "2015-11-02T13:11:09.000Z",
                    "updatedAt": "2015-11-23T07:07:09.000Z",
                    "write": true
                }
            ]
        },
        {
            "folder": "716f3aae-e9f9-af22-ccfa-9f9ae89079c8",
            "id": "dabb3e5b-e947-b7a9-60cb-4bc16d8f4249",
            "name": "Streamed Response",
            "dataMode": "params",
            "data": [],
            "rawModeData": null,
            "descriptionFormat": null,
            "description": "This endpoint allows one to recieve streaming http response using [chunked transfer encoding](https://en.wikipedia.org/wiki/Chunked_transfer_encoding) of a configurable length.\n\nA streaming response does not wait for the entire response to be generated on server before flushing it out. This implies that for a fairly large response, parts of it can be streamed to the requestee as and when it is generated on server. The client can then take actions of processing this partially received data.",
            "headers": "",
            "method": "GET",
            "pathVariables": {},
            "url": "https://echo.getpostman.com/stream/10",
            "preRequestScript": "",
            "tests": "tests[\"response code is 200\"] = responseCode.code === 200;\ntests[\"response is sent in chunks\"] = (postman.getResponseHeader('Transfer-Encoding') === 'chunked')\n",
            "currentHelper": "normal",
            "helperAttributes": {},
            "collectionId": "f695cab7-6878-eb55-7943-ad88e1ccfd65"
        },
        {
            "folder": "8fc8854b-efc8-dc9b-6e91-64ff3dfdec7f",
            "id": "df5d6f0a-afbf-dc9e-303d-a4e858f564a4",
            "name": "Delete Cookies",
            "dataMode": "params",
            "data": [],
            "rawModeData": null,
            "descriptionFormat": null,
            "description": "One or more cookies that has been set for this domain can be deleted by providing the cookie names as part of the URL parameter. The response of this request is a JSON containing the list of currently set cookies.",
            "headers": "",
            "method": "GET",
            "pathVariables": {},
            "url": "https://echo.getpostman.com/cookies/delete?foo1&foo2",
            "preRequestScript": "",
            "tests": "var responseJSON;\ntry {\n    tests[\"Body contains cookies\"] = responseBody.has(\"cookies\");\n    responseJSON = JSON.parse(responseBody);\n    tests[\"Body contains cookie foo2\"] = !('foo2' in responseJSON.cookies);\n    tests[\"Body does not contain cookie foo2\"] = !('foo1' in responseJSON.cookies);\n}\ncatch (e) { }\n\ntests[\"Status code is 200\"] = responseCode.code === 200;\n",
            "currentHelper": "normal",
            "helperAttributes": {},
            "collectionId": "f695cab7-6878-eb55-7943-ad88e1ccfd65",
            "responses": [
                {
                    "owner": 0,
                    "lastUpdatedBy": "181687",
                    "lastRevision": 86088944,
                    "request": "4ac1e980-6990-fc1d-5f80-4e5cedce9812",
                    "id": "2ef12d3e-718e-ab76-0ff1-eeba744e8f31",
                    "name": "Cookies Response",
                    "status": "",
                    "responseCode": {
                        "code": 200,
                        "name": "OK"
                    },
                    "time": "1417",
                    "headers": [
                        {
                            "name": "Access-Control-Allow-Credentials",
                            "key": "Access-Control-Allow-Credentials",
                            "value": "",
                            "description": ""
                        },
                        {
                            "name": "Access-Control-Allow-Headers",
                            "key": "Access-Control-Allow-Headers",
                            "value": "",
                            "description": ""
                        },
                        {
                            "name": "Access-Control-Allow-Methods",
                            "key": "Access-Control-Allow-Methods",
                            "value": "",
                            "description": ""
                        },
                        {
                            "name": "Access-Control-Allow-Origin",
                            "key": "Access-Control-Allow-Origin",
                            "value": "",
                            "description": ""
                        },
                        {
                            "name": "Connection",
                            "key": "Connection",
                            "value": "keep-alive",
                            "description": ""
                        },
                        {
                            "name": "Content-Encoding",
                            "key": "Content-Encoding",
                            "value": "gzip",
                            "description": ""
                        },
                        {
                            "name": "Content-Length",
                            "key": "Content-Length",
                            "value": "46",
                            "description": ""
                        },
                        {
                            "name": "Content-Type",
                            "key": "Content-Type",
                            "value": "application/json; charset=utf-8",
                            "description": ""
                        },
                        {
                            "name": "Date",
                            "key": "Date",
                            "value": "Thu, 29 Oct 2015 06:16:00 GMT",
                            "description": ""
                        },
                        {
                            "name": "Server",
                            "key": "Server",
                            "value": "nginx/1.6.2",
                            "description": ""
                        },
                        {
                            "name": "Vary",
                            "key": "Vary",
                            "value": "Accept-Encoding",
                            "description": ""
                        },
                        {
                            "name": "X-Powered-By",
                            "key": "X-Powered-By",
                            "value": "Sails <sailsjs.org>",
                            "description": ""
                        }
                    ],
                    "cookies": [],
                    "mime": "",
                    "text": "{\"cookies\":{\"foo2\":\"bar\"}}",
                    "language": "javascript",
                    "rawDataType": "text",
                    "state": {
                        "size": "normal"
                    },
                    "previewType": "html",
                    "searchResultScrolledTo": "-1",
                    "version": null,
                    "requestObject": "\"4ac1e980-6990-fc1d-5f80-4e5cedce9812\"",
                    "createdAt": "2015-11-02T13:11:10.000Z",
                    "updatedAt": "2015-11-23T07:07:10.000Z",
                    "write": true
                }
            ]
        },
        {
            "folder": "e0807fa3-a7cd-4b33-7014-b548b3c54e85",
            "id": "f2bb958e-59cb-405f-bb86-4949a6f5cf6f",
            "name": "DigestAuth Request",
            "dataMode": "params",
            "data": [
                {
                    "key": "code",
                    "value": "xWnkliVQJURqB2x1",
                    "type": "text",
                    "enabled": true
                },
                {
                    "key": "grant_type",
                    "value": "authorization_code",
                    "type": "text",
                    "enabled": true
                },
                {
                    "key": "redirect_uri",
                    "value": "https://www.getpostman.com/oauth2/callback",
                    "type": "text",
                    "enabled": true
                },
                {
                    "key": "client_id",
                    "value": "abc123",
                    "type": "text",
                    "enabled": true
                },
                {
                    "key": "client_secret",
                    "value": "ssh-secret",
                    "type": "text",
                    "enabled": true
                }
            ],
            "rawModeData": null,
            "descriptionFormat": null,
            "description": "Performing a simple `GET` request to this endpoint returns status code `401 Unauthorized` with `WWW-Authenticate` header containing information to successfully authenticate subsequent requests.\nThe `WWW-Authenticate` header must be processed to extract `realm` and `nonce` values to hash subsequent requests.\n\nWhen this request is executed within Postman, the script attached with this request does the hard work of extracting realm and nonce from the header and set it as [global variables](https://www.getpostman.com/docs/environments#global-variables?source=echo-collection-app-onboarding) named `echo_digest_nonce` and `echo_digest_realm`.\nThese variables are re-used in subsequent request for seamless integration of the two requests.",
            "headers": "",
            "method": "GET",
            "pathVariables": {},
            "url": "https://echo.getpostman.com/digest-auth",
            "preRequestScript": "",
            "tests": "tests[\"response code is 401\"] = responseCode.code === 401;\ntests[\"response has WWW-Authenticate header\"] = (postman.getResponseHeader('WWW-Authenticate'));\n\nvar authenticateHeader = postman.getResponseHeader('WWW-Authenticate'),\n    realmStart = authenticateHeader.indexOf('\"',authenticateHeader.indexOf(\"realm\")) + 1 ,\n    realmEnd = authenticateHeader.indexOf('\"',realmStart),\n    realm = authenticateHeader.slice(realmStart,realmEnd),\n    nonceStart = authenticateHeader.indexOf('\"',authenticateHeader.indexOf(\"nonce\")) + 1,\n    nonceEnd = authenticateHeader.indexOf('\"',nonceStart),\n    nonce = authenticateHeader.slice(nonceStart,nonceEnd);\n    \npostman.setGlobalVariable('echo_digest_realm', realm);\npostman.setGlobalVariable('echo_digest_nonce', nonce);",
            "currentHelper": "normal",
            "helperAttributes": {},
            "collectionId": "f695cab7-6878-eb55-7943-ad88e1ccfd65"
        }
    ]
}

P.S: I tried to upload a zipped file but it's failed.

aubm commented 8 years ago

Thank you, I'll look deeper later. After a quick check, I can see some minor differences between your collection and the ones I use for testing purpose. Which version of Postman are you using?

ghost commented 8 years ago

Thank you aubm. It's Postman 4.1.3.

aubm commented 8 years ago

I created a new tag, please download the latest release and tell me if it did fix the error for you :)

If you prefer to install it from sources, you can do:

go get -u github.com/aubm/postmanerator
go install github.com/aubm/postmanerator
ghost commented 8 years ago

Hi again aubm. I've tested it and I can confirm it works with the default collection I used before, but failed with a new file I used. Due to sensitivity of the data, I'm so sorry I can't attach it here, perhaps I would attach it after I make change to the data later. However, here is the errors generated:

json: cannot unmarshal number 1461472319137 into Go value of type int

aubm commented 8 years ago

Hello, thank you for your feedback, it is very precious :)

It appears that this value is too big to be deserialized in an int, using an int64 seems to do the trick.

Sorry this is blocking you, I'll do the fix later :) If you feel confortable with Go, feel free to make the edit yourself :)

aubm commented 8 years ago

Hello, now you can try with the latest v0.4.3 to see if it fixes the number unmarshal issue :)

Hope it helps!

ghost commented 8 years ago

Hi again, @aubm . It works fine now, thank you. Great job!