private Request CreateInkRecognitionRequest(HttpPipeline pipeline,
                                                    IEnumerable <InkStroke> strokes,
                                                    ApplicationKind applicationKind,
                                                    string language,
                                                    InkPointUnit inkPointUnit,
                                                    float unitMultiple)
        {
            Azure.Core.Http.Request request = pipeline.CreateRequest();

            // add content
            var inkRecognitionRequest = new InkRecognitionRequest(strokes,
                                                                  applicationKind,
                                                                  language,
                                                                  inkPointUnit,
                                                                  unitMultiple);
            var content = new MemoryStream(Encoding.UTF8.GetBytes(inkRecognitionRequest.ToJson()));

            request.Content = HttpPipelineRequestContent.Create(content);

            // specify HTTP request line
            request.Method = RequestMethod.Put;
            var requestUri = new RequestUriBuilder();

            requestUri.Reset(_endpoint);
            request.Uri.Scheme = requestUri.Scheme;
            request.Uri.Host   = requestUri.Host;
            request.Uri.Port   = requestUri.Port;
            request.Uri.Path   = requestUri.Path;
            request.Uri.Query  = requestUri.Query;

            // add headers for authentication
            _credential.SetRequestCredentials(request);

            return(request);
        }