microsoft / AzUrlShortener

An simple and easy Url Shortener
MIT License
519 stars 561 forks source link

Short a POST URL Api #297

Closed rchristofano closed 1 year ago

rchristofano commented 3 years ago

I have some APIs create using Azure Logic Apps, for example one that turn on/off a VM.

POST: https://prod-70.eastus.logic.azure.com:443/workflows/xxxxxxxxxxxxxxxxxxxxxxxxx/triggers/manual/paths/invoke?api-version=2016-10-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=ranMC4LmgGovLac-d6r2IN0m25CX_nf6ou6JOufEpaw

it works very well,

I created a short URL using TinyBlazorAdmin for this large url

POST: https://example.azurewebsites.net/vmautomation

I got this error message:

{ "error": { "code": "TriggerRequestMethodNotValid", "message": "The HTTP method for this request is not valid: expected 'POST' and actual 'GET'." } } I understand that AzUrlShorter just work for GET request: Do you confirm or not? if not, what I need to do to fix it?

ThDJRenton commented 3 years ago

@rchristofano the UrlShortener method requires a POST request, GET is not supported.