Exemplo n.º 1
0
 /// <summary>
 /// Add a global handler to be run the moment every response is received
 /// </summary>
 /// <param name="builder">The extended ISolidHttpBuilder</param>
 /// <param name="action">The handler to be run</param>
 /// <returns>The builder</returns>
 public static ISolidHttpCoreBuilder OnResponse(this ISolidHttpCoreBuilder builder, Action <IServiceProvider, HttpResponseMessage> action)
 => builder.OnResponse(action.ToAsyncFunc());
Exemplo n.º 2
0
 /// <summary>
 /// Add a globa
 /// <param name="builder">The extended ISolidHttpBuilder</param>l handler to be run the moment every response is received
 /// </summary>
 /// <param name="func">The handler to be run</param>
 /// <returns>The builder</returns>
 public static ISolidHttpCoreBuilder OnResponse(this ISolidHttpCoreBuilder builder, Func <HttpResponseMessage, Task> func)
 => builder.OnResponse((_, c) => func(c));
Exemplo n.º 3
0
 /// <summary>
 /// Add a global handler to be run the moment every response is received
 /// </summary>
 /// <param name="builder">The extended ISolidHttpBuilder</param>
 /// <param name="action">The handler to be run</param>
 /// <returns>The builder</returns>
 public static ISolidHttpCoreBuilder OnResponse(this ISolidHttpCoreBuilder builder, Action <HttpResponseMessage> action)
 => builder.OnResponse((_, c) => action(c));