/// <summary> /// Adds headers to the <see cref="ISolidHttpRequest"/>. /// </summary> /// <param name="request">The <see cref="ISolidHttpRequest"/> that is being extended.</param> /// <param name="parameters">The headers to be added.</param> /// <returns>The <see cref="ISolidHttpRequest"/> so that additional calls can be chained.</returns> public static ISolidHttpRequest WithHeaders(this ISolidHttpRequest request, IDictionary <string, string> parameters) { foreach (var parameter in parameters) { request.WithHeader(parameter.Key, parameter.Value); } return(request); }
/// <summary> /// Adds an authorization header to the <see cref="ISolidHttpRequest"/>. /// </summary> /// <param name="request">The <see cref="ISolidHttpRequest" /> that is being extended.</param> /// <param name="scheme">The authorization scheme of the header value.</param> /// <param name="value">The authorization value.</param> /// <returns>The <see cref="ISolidHttpRequest" /> so that additional calls can be chained.</returns> public static ISolidHttpRequest WithAuthorizationHeader(this ISolidHttpRequest request, string scheme, string value) => request.WithHeader("Authorization", $"{scheme} {value}");
protected virtual void ConfigureRequest(ISolidHttpRequest request) { request.WithHeader(OutputIdHeaderName, OutputId.ToString()); }