The List2Collection automates the creation of a Postman collection based on user inputs for host, collection name, method, and path(route+endpoint).
The file with: method, and path(route+endpoint), should contain something like this example:
- POST /api/v1/something
- DELETE /something
- PUT /api/v2/something
- GET /api/something
Dont worry it's works w/ unlimited lines.
The script prompts the user to enter the host, collection name, and the filename of the method_and_path file.
The script reads the method and path(route+endpoint) or endpoint information from the specified "method_url.txt" file.
For each method and endpoint combination, the script generates a Postman request object with default headers, using the provided host and endpoint information.
The script organizes the generated requests into a Postman collection, using the specified collection name.
The script prompts the user to input the desired filename for the resulting Postman collection JSON file.
Finally, the script saves the Postman collection as a JSON file using the specified filename.