I want to have a service that accepts a createURL call from the user and it creates the unique URL and returns the unique URL to the user for them to call it later. I want the user to have the ability to specify the HTTP method and expected request body in the createURL call.
I know about path parameters where I can create an endpoint for the user for example: hello.com/makecall/userid1 but the method and request need to be the same for all users. I want completely separate endpoints with different methods and different request types for every created endpoint.
Is this possible without restarting the server every time I'm registering the endpoint handler? Is this a bad practice in general to try to register so many handlers?
I imagine a workaround is to use path parameters. The downside is that the user can't specify the HTTP method and the request body they expect. All calls to hello.com/makecall/any-user-id would need to be for example POST with the Request type being unspecified.
Thanks!
Aucun commentaire:
Enregistrer un commentaire