Skip to content

`curl -X POST http://localhost:1234/orgy` → Too Many Requests

License

Notifications You must be signed in to change notification settings

tvardy/intercourse-api

Repository files navigation

Intercourse API

Short Description

This repo was an exercise... an exercise of:

  • using TypeScript for the first time in my own BE project...
  • trying to write a code that might be re-usable between Express, Polka and Koa
  • finding funny usages for HTTP codes...

Why was it created?

I faced too many "slip of a tongue" moments while working with male co-developers.

So many times some of us accidentally mentioned "the strapon endpoint" (instead of "bootstrap"... don't ask me why... we're Poles 😂).

So many times I've seen chat messages like curl -X GET /high-heels/on or PUT /lipstick/on

...that's why I eventually decided to put such an API to life...

Running locally

You need to have Node@^16 and NPM@^8 (or Yarn@^1) installed on your machine.

  1. clone the repository
  2. install dependencies (run npm install or yarn install or bun install command)
  3. run one of the dev:* scripts from package.json file

Using as an easter-egg in your project

Middleware for Express, Polka and Koa are available in the src/middleware folder.

Examples of usage are shown in simple apps in src/app folder.

Some examples

Getting toys

REQUEST:

# GET http://localhost:1234/handcuffs

RESPONSE:

{"status":200,"message":"OK"}
Using toys

REQUEST:

# PUT http://localhost:1234/highheels/on

RESPONSE:

{"status":202,"message":"Accepted"}
People

REQUEST:

# GET http://localhost:1234/teenager

RESPONSE:

{"status":451,"message":"Unavailable For Legal Reasons"}

REQUEST:

# GET http://localhost:1234/escort

RESPONSE:

{"status":402,"message":"Payment Required"}

REQUEST:

# POST http://localhost:1234/orgy

RESPONSE:

{"status":429,"message":"Too Many Requests"}
Interactions

REQUEST:

# PUT http://localhost:1234/tongue/into/ear

RESPONSE:

{"status":502,"message":"Bad Gateway"}

REQUEST:

# PUT http://localhost:1234/dick/into/ass

RESPONSE:

{"status":401,"message":"Unauthorized without ?condom"}

Postman collection

Here's an example Postman Collection

About

`curl -X POST http://localhost:1234/orgy` → Too Many Requests

Resources

License

Stars

Watchers

Forks