Rapidly develop your front end web app and mobile app without ever installing a mock server.

A mock server that you can use during development or testing without installing anything and without writing any configuration file.

Use Cases

Check app's UI when network is slow

Internet connection is not fast every where. As an app developer, you have to make sure your app still looks nice and informative when the data your app needs cannot be fetched and displayed instantly. For example, you can display a loading indicator while data is being loaded.

When developing a web app, you can throttle the network connection in Google Chrome. When developing an iOS app, you can use the Network Link Conditioner on Mac to throttle the network connection of your Mac which will affect the iOS simulator as well. But those two solutions will throttle your network connection globally. It will affect not only every network calls your app made, but also your computer's connection speed in the case of using Network Link Conditioner.

With Coparrot, you can delay a certain API call from your app by specifying the delay in the query string __cp_delay or in the HTTP header X-CP-DELAY. For example, to get a user with id 1, your app will call your API server with /users/1 pathname. You can then use the following URL

https://use.coparrot.dev/api/users/1?__cp_response=%7B%22id%22%3A12,%22name%22%3A%22Joey%22,%22gender%22%3A%22male%22%7D&__cp_license_key=valid-license-key&__cp_delay=3
which will return the following JSON after 3 seconds
{
	"id": 12,
	"name": "Joey",
	"gender": "male"
}
Note that the JSON response is defined in the __cp_response query string.

Start using Coparrot by reading the documentation.

Check app's UI for Error HTTP Status

Your server will not always return 200 HTTP status code. With Coparrot, when you need to check how your app's UI looks and behaves when your server returns 404 or 500 status code, you can just specify __cp_status in the query string or X-CP-STATUS in the header of your request.

For example, the following network call in a Node.js app will return a 500 status code after 1 seconds.

const fetch = require('node-fetch');

let url = 'https://use.coparrot.dev/api/whatever/path';

let options = {
  method: 'POST',
  headers: {
    'X-CP-DELAY': '1',
    'X-CP-LICENSE-KEY': 'get-valid-coparrot-license-key',
    'X-CP-STATUS': '500'
  }
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error('error:' + err));

Start using Coparrot by reading the documentation.