@@ -21,6 +21,39 @@ namespace Microsoft.Kiota.Abstractions
2121 /// </summary>
2222 public class RequestInformation
2323 {
24+ /// <summary>
25+ /// Creates a new instance of <see cref="RequestInformation"/>.
26+ /// </summary>
27+ public RequestInformation ( )
28+ {
29+
30+ }
31+ /// <summary>
32+ /// Creates a new instance of <see cref="RequestInformation"/> with the given method and url template.
33+ /// </summary>
34+ /// <param name="method"></param>
35+ /// <param name="urlTemplate"></param>
36+ /// <param name="pathParameters"></param>
37+ public RequestInformation ( Method method , string urlTemplate , IDictionary < string , object > pathParameters )
38+ {
39+ HttpMethod = method ;
40+ UrlTemplate = urlTemplate ;
41+ PathParameters = pathParameters ;
42+ }
43+ /// <summary>
44+ /// Configures the current request configuration headers, query parameters, and options base on the callback provided.
45+ /// </summary>
46+ /// <typeparam name="T">Type for the query parameters</typeparam>
47+ /// <param name="requestConfiguration">Callback to configure the request</param>
48+ public void Configure < T > ( Action < RequestConfiguration < T > > ? requestConfiguration ) where T : class , new ( )
49+ {
50+ if ( requestConfiguration == null ) return ;
51+ var requestConfig = new RequestConfiguration < T > ( ) ;
52+ requestConfiguration ( requestConfig ) ;
53+ AddQueryParameters ( requestConfig . QueryParameters ) ;
54+ AddRequestOptions ( requestConfig . Options ) ;
55+ AddHeaders ( requestConfig . Headers ) ;
56+ }
2457 internal const string RawUrlKey = "request-raw-url" ;
2558 private Uri ? _rawUri ;
2659 /// <summary>
0 commit comments