ApiSdk.Me.Planner.Plans.Item.Buckets.BucketsRequestBuilder.CreatePostRequestInformation C# (CSharp) Method

CreatePostRequestInformation() public method

Create new navigation property to buckets for me Configuration for the request such as headers, query parameters, and middleware options.
public CreatePostRequestInformation ( PlannerBucket body, Action requestConfiguration = default ) : RequestInformation
body PlannerBucket
requestConfiguration Action
return RequestInformation
        public RequestInformation CreatePostRequestInformation(PlannerBucket body, Action<BucketsRequestBuilderPostRequestConfiguration> requestConfiguration = default) {
            _ = body ?? throw new ArgumentNullException(nameof(body));
            var requestInfo = new RequestInformation {
                HttpMethod = Method.POST,
                UrlTemplate = UrlTemplate,
                PathParameters = PathParameters,
            };
            requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body);
            if (requestConfiguration != null) {
                var requestConfig = new BucketsRequestBuilderPostRequestConfiguration();
                requestConfiguration.Invoke(requestConfig);
                requestInfo.AddRequestOptions(requestConfig.Options);
                requestInfo.AddHeaders(requestConfig.Headers);
            }
            return requestInfo;
        }
        /// <summary>Collection of buckets in the plan. Read-only. Nullable.</summary>