Giter Site home page Giter Site logo

bobo's Introduction

Here's Bobo

Bobo loves to answer your api requests and is always ready to throw some error codes your way. Need new routes as you test? No problem!

Usage Examples

Simple echo of anything you POST

$ curl -XPOST localhost:8080/echo -d 'Hello world!'
Hello world!

$ curl -XPOST localhost:8080/echo -d '{"user": "John Doe"}'
{"user": "John Doe"}

Simulate any number of random errors (with a mix of 200's for testing success)

$ parallel -N0 "curl -I -XGET -s localhost:8080/errors" ::: {1..100}

Return the requested status code

$ curl -v -s localhost:8080/status/503 2>&1 | grep HTTP
> GET /status/503 HTTP/1.1
< HTTP/1.1 503 Service Unavailable

$ curl -v -s localhost:8080/status/401 2>&1 | grep HTTP
> GET /status/401 HTTP/1.1
< HTTP/1.1 401 Unauthorized

Get healthz

$ curl -s localhost:8080/healthz
OK

Return hostname:

curl -s localhost:8080/host
Laptop.local

Add routes dynamically:

$ curl -X POST localhost:8080/routes -d '[
    {"path": "newroute", "method": "GET", "response": "woo hoo", "code": 200},
    {"path": "users/alice", "method": "GET", "response": "Alice has worked here literally forever.", "code": 200},
    {"path": "users/bob", "method": "DELETE", "response": "", "code": 202}
]'

$ curl -s -XGET localhost:8080/newroute
woo hoo

$ curl -s -XGET localhost:8080/users/alice
Alice has worked here literally forever.

$ curl -I -XDELETE localhost:8080/users/bob
HTTP/1.1 202 Accepted
content-length: 0
date: Mon, 17 Jun 2024 05:31:01 GMT

bobo's People

Contributors

kg6zjl avatar renovate[bot] avatar

Watchers

 avatar

bobo's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

asdf
.tool-versions
  • rust 1.79.0
cargo
Cargo.toml
  • actix 0.13.5
  • actix-rt 2.10.0
  • actix-web 4.7.0
  • env_logger 0.11.3
  • gethostname 0.5.0
  • log 0.4.21
  • mpsc 0.2.3
  • oasgen 0.20.1
  • rand 0.8.5
  • serde 1.0.203
  • serde_json 1.0
  • serde_yaml 0.9.34
  • tokio 1.38.0
  • warp 0.3.7

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.