GithubHelp home page GithubHelp logo

httpbin-api's Introduction

HTTPBIN

Test you HTTP calls with this API. It captures request and replays the details back to you.

Bulding and running

You need to have a PostgreSQL database running. Modify the connection string inside appsettings.json to match your database.

# Install dependencies
dotnet restore

# Run migrations
dotnet ef database update

# Run the application
dotnet run

The frontend repository can be found here.

Design

The point of this project is to offer a simple way for testing HTTP calls. It captures the request and replays it back to you, the frontend is going to display the request details and the response in a more readable way.

Each user will be able to create a bucket, wich will hold the requests. The bucket will have a unique id, and only the user will have access to it. To prevent unauthorized access to the bucket, when a bucket gets created we also inlcude a JWT token that will be used to get access to the bucket. In additon, each bucket get a TTL (time to live) value, after the TTL expires the bucket will be deleted.

The frontend will be a simple SPA, that will allow the user to create a bucket, and make HTTP calls to the bucket. The frontend will also display the request details and the response. The fronted can be found here.

Available endpoints

The base URL is http://localhost:7134/api/ and the available endpoints are:

Buckets

  • POST /buckets - Create a new bucket, and implicit a new JWT token.
  • GET /buckets - Get the bucket details from the JWT token.
  • PATCH /buckets - Update the bucket TTL.
  • DELETE /buckets - Delete the bucket from the JWT token.

Requests

  • GET /requests/{id} - Get the request details.
  • DELETE /requests/{id} - Delete the request.
  • GET /requests/{id}/bucket/{bucketId} - Get all the requests from a bucket.

Request Reciever

  • GET/HEAD/POST/PUT/OPTIONS/PATCH/DELETE /{bucketId}/{*} - Recieve the request and store it in the database. Optionaly, it can take route parameters aswell, since it matches any path that has the base URL and the bucketId specified.

httpbin-api's People

Contributors

cataliniuga avatar

Watchers

 avatar

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.