Skip to content

misobarisic/freemock

Repository files navigation

Welcome to FreeMock API 👋

About

This RESTful Mock API is completely free, requires no configuring and no registration. Not to mention, a hard coded request rate limiter is not present.

Usage

Send a HTTP PUT/POST/DELETE/PATCH request to https://mockapi.misobarisic.com/mock with the body containing your custom mock object:

{
  "<key>": "<type>"
}

Example

{
  "exampleBool": "boolean",
  "exampleInt": "integer",
  "exampleFloat": "float",
  "exampleDate": "date",
  "advancedInt": "int 5d",
  "advancedFloat": "fl 3d",
  "complex": {
    "real": "float",
    "imaginary": "float"
  }
}

Types

  • boolean / bool -> returns true or false
  • date -> returns current date
  • float / fl -> returns a floating point number
  • integer / int
  • string / str

Options

Passing additional parameters is also supported. Just make sure to append them to the end of your strings.

Float

  • d -> defines the number of decimals placed -> "float 5d"

Integer

  • d -> defines the max amount of digits a number can have -> "int 3d"

String

  • c -> defines the length of the string -> "string 5c"

Deploy your own

Deploy with Vercel

Author

👤 Mišo Barišić

Show your support

Give a ⭐️ if this project helped you!

📝 License

This project is MIT licensed.

Releases

No releases published

Packages

No packages published