vendredi 14 juillet 2017

What is the best pattern for a client application that have many requests to an rest api

I have a small c# application that try to connect a rest api and make some calls. I tried to build my application with a useful design pattern but i am not sure which design pattern(s) i should use.

Properties of application:

  1. has possibilty to connect more than one api (has more than one base url)
  2. each api has many end-points like:
    • POST /process-groups/{id}/templates/upload
    • DELETE /process-groups/{id}
    • PUT /process-groups/{id}
    • GET /templates/{id}/download
  3. each api will do many calls like get some xml files, upload some xml files, update some properties, delete some objects via rest calls
  4. the updated files will be logged
  5. the errored files will be retried
  6. have some methods do smiliar works and just some small diffrences between each other; like has a method for geting files and another one for deleting file, thats have quite similiar method body.
  7. doesn't store anything at database.
  8. HttpClient is using dor request calling

    I already checked some similar questions but i didn't find something usefull for myself. Also it will nice if you can give some links for best pracrices.

Aucun commentaire:

Enregistrer un commentaire