Skip to content

This API allows relaying HTTP requests to another URL while supporting different methods

Notifications You must be signed in to change notification settings

MrJulus/reqRelay

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

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!

About

This API allows relaying HTTP requests to another URL while supporting different methods

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published