upstash / qstash-js

Message queue for serverless
https://docs.upstash.com/qstash
MIT License
133 stars 11 forks source link

Qstash POST request to GET-only endpoint results in 405 error #25

Closed Spikeysanju closed 9 months ago

Spikeysanju commented 1 year ago

Hi @chronark , I have a question about Qstash. Does it support GET requests in addition to POST requests? Our team is developing an uptime monitoring app for our SaaS product, and we have encountered an issue where some pages only support GET requests. Qstash is currently sending POST requests to these pages, which is causing a 405 error to be thrown. Is there a way to fix this issue, such as using a proxy method or configuring an option within Qstash?

Thank you for your help with this matter.

chronark commented 1 year ago

Hey @Spikeysanju , Currently QStash is only capable of sending post requests. However multiple people requested this and I'll talk to the team about adding this.

In the meantime you could Instead use a serverless function to proxy the request.

Qstash sends a post to the serverless function, which then does the GET request. It's not ideal but should allow you to run this until we add native support

chronark commented 9 months ago

Available in v2 using Upstash-Method: GET headers