default <T> Caller.Sync<T> sync() {
		return resource -> {
			if (Thread.currentThread().isInterrupted()) {
				return new Response.ClientError<>(resource, new InterruptedException());
			}

			@SuppressWarnings("unchecked")
			final var result = this.call(resource)
				.handle((value, error) ->
					(Response<T>)switch (error) {
						case ResponseException e -> e.failure();
						case UncheckedIOException e -> new Response.ClientError<>(
							resource,
							e.getCause()
						);
						case Throwable e -> new Response.ClientError<>(resource, e);
						case null -> value;
					}
				);

			try {
				return result.get();
			} catch (InterruptedException e) {
				result.cancel(true);
				Thread.currentThread().interrupt();
				return new Response.ClientError<>(resource, e);
			} catch (ExecutionException e) {
				return new Response.ClientError<>(resource, e.getCause());
			} catch (Exception e) {
				return new Response.ClientError<>(resource, e);
			}
		};
	}
Return a synchronous caller, which is build upon the asynchronous caller
returned by the {@link #async()} method.

@return a synchronous caller
@param <T> the response body type
jenetics.incubator/src/main/java/io/jenetics/incubator/restful/client/Client.java