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.
- 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
, andDELETE
methods. - Returns the response from the target API in JSON format.
https://req-relay.vercel.app/api/fetch?url=https://jsonplaceholder.typicode.com/todos/1
https://req-relay.vercel.app/api/fetch?url=https://jsonplaceholder.typicode.com/posts&method=POST&title=MyTitle&body=TestContent&userId=1
https://req-relay.vercel.app/api/fetch?url=https://jsonplaceholder.typicode.com/posts/1&method=PUT&title=NewTitle
https://req-relay.vercel.app/api/fetch?url=https://jsonplaceholder.typicode.com/posts/1&method=DELETE
- Mr_Julus (@MrJulus)
💡 Feel free to contribute by opening an issue or a pull request!