This repository was archived by the owner on Dec 8, 2023. It is now read-only.

Description
Currently if you want to do multiple calls to the same service you can, at most, save the request builder and start from there every time.
RequestBuilder<API> builder = Fetchyfetchy.createRequest("serviceId", API.class)
.timeout(10);
Object result = builder
.callable(client -> client.method())
.execute();
builder
.runnable(client -> client.method())
.execute();
My suggestion is have something that allows you to set defaults for a given service and then use the normal fetchy calls on it:
FetchyProxy proxy = fetchy.buildProxy("serviceId", API.class)
.withTimeout(10)
.build();
Object result = proxy.call(client -> client.method());
proxy.run(client -> client.method());
proxy.createRequest()
.runnable(client -> client.method())
.timeout(10)
.execute();
I believe, after ending up with similar code abstractions in my own fetchy usage, this may simplify things but would like to hear the opinion of other people.