mercredi 25 mars 2020

Re-invoke previous method by reflection

I'm trying to build a error proof api.

My current serve is very unstable and several times will throw http 500 but 5 seconds later will return the right response for the very same request.

I'm not able to solve the backend problems yet so i need to build a client able to retry case gets this annoying error.

All API requets have a common method that handles the response and analyzes possible erros, i would like to make something like:

    if(error on server)
retry_same_method();

I'm trying to do this through reflection, I've the original object and method name. But i dont know how to get the method params. is that any way i can do this?





Aucun commentaire:

Enregistrer un commentaire