This project is a Chrome plugin that serves as a tool for creating HTTP mocks for Mocker API. It records HTTP requests made by the user and exports them into mock.js format for easy integration with Mocker API.
To install the plugin, follow these steps:
- Download the latest release from the releases section.
- Unzip the downloaded file.
- Open Chrome and go to
chrome://extensions/
. - Enable Developer Mode.
- Click on "Load unpacked" and select the unzipped folder.
- Open the Chrome browser.
- Navigate to the webpage where you want to create HTTP mocks.
- Click on the plugin icon in the Chrome toolbar to start recording HTTP requests.
- Interact with the webpage to trigger different HTTP requests.
- Click on the plugin icon again to stop recording.
- Export the recorded HTTP requests to mock.js format for Mocker API integration.
Below is an example of how to export recorded HTTP requests to mock.js format:
// mock.js
module.exports = {
'GET /api/users': [{ id: 1, name: 'Alice' }, { id: 2, name: 'Bob' }],
'POST /api/users': { id: 3, name: 'Charlie' }
};
This project is licensed under the MIT License - see the LICENSE.md file for details.
Feel free to contribute to this project by forking it and submitting a pull request. Any contributions are welcome!
If you encounter any issues or have any questions, please open an issue in the GitHub repository.
Feel free to customize this README as needed for your project.