Skip to content

Latest commit

 

History

History
37 lines (28 loc) · 1.21 KB

File metadata and controls

37 lines (28 loc) · 1.21 KB

ReqRelay, A API Proxy

This project is an API proxy that allows HTTP requests (GET, POST, PUT, DELETE) to another URL. It handles query parameters and sends the response in JSON format.

Features

  • Handles HTTP methods GET, POST, PUT, DELETE.
  • Adds the necessary CORS headers to allow API access from any origin.
  • Accepts parameters through the request URL or in the body for POST, PUT, and DELETE methods.
  • Returns the response from the target API in JSON format.

Examples

Example of a GET request:

https://req-relay.vercel.app/api/fetch?url=https://jsonplaceholder.typicode.com/todos/1

Example of a POST request:

https://req-relay.vercel.app/api/fetch?url=https://jsonplaceholder.typicode.com/posts&method=POST&title=MyTitle&body=TestContent&userId=1

Example of a PUT request:

https://req-relay.vercel.app/api/fetch?url=https://jsonplaceholder.typicode.com/posts/1&method=PUT&title=NewTitle

Example of a DELETE request:

https://req-relay.vercel.app/api/fetch?url=https://jsonplaceholder.typicode.com/posts/1&method=DELETE

❤️ Contributors

  • Mr_Julus (@MrJulus)

💡 Feel free to contribute by opening an issue or a pull request!