@@ -348,7 +348,7 @@ private async Task<long> ReadUntilBoundaryAsync(CustomBinaryReader reader, long
348348 /// <summary>
349349 /// Gets the request body as bytes.
350350 /// </summary>
351- /// <param name="cancellationToken"></param>
351+ /// <param name="cancellationToken">Optional cancellation token for this async task. </param>
352352 /// <returns>The body as bytes.</returns>
353353 public async Task < byte [ ] > GetRequestBody ( CancellationToken cancellationToken = default )
354354 {
@@ -363,7 +363,7 @@ public async Task<byte[]> GetRequestBody(CancellationToken cancellationToken = d
363363 /// <summary>
364364 /// Gets the request body as string.
365365 /// </summary>
366- /// <param name="cancellationToken">Cancellation token for this async task is optional .</param>
366+ /// <param name="cancellationToken">Optional cancellation token for this async task.</param>
367367 /// <returns>The body as string.</returns>
368368 public async Task < string > GetRequestBodyAsString ( CancellationToken cancellationToken = default )
369369 {
@@ -404,10 +404,12 @@ public void SetRequestBodyString(string body)
404404 SetRequestBody ( WebSession . Request . Encoding . GetBytes ( body ) ) ;
405405 }
406406
407+
407408 /// <summary>
408409 /// Gets the response body as bytes.
409410 /// </summary>
410- /// <returns></returns>
411+ /// <param name="cancellationToken">Optional cancellation token for this async task.</param>
412+ /// <returns>The resulting bytes.</returns>
411413 public async Task < byte [ ] > GetResponseBody ( CancellationToken cancellationToken = default )
412414 {
413415 if ( ! WebSession . Response . IsBodyRead )
@@ -421,6 +423,7 @@ public async Task<byte[]> GetResponseBody(CancellationToken cancellationToken =
421423 /// <summary>
422424 /// Gets the response body as string.
423425 /// </summary>
426+ /// <param name="cancellationToken">Optional cancellation token for this async task.</param>
424427 /// <returns>The string body.</returns>
425428 public async Task < string > GetResponseBodyAsString ( CancellationToken cancellationToken = default )
426429 {
@@ -435,7 +438,7 @@ public async Task<string> GetResponseBodyAsString(CancellationToken cancellation
435438 /// <summary>
436439 /// Set the response body bytes.
437440 /// </summary>
438- /// <param name="body"></param>
441+ /// <param name="body">The body bytes to set. </param>
439442 public void SetResponseBody ( byte [ ] body )
440443 {
441444 if ( ! WebSession . Request . Locked )
@@ -450,7 +453,7 @@ public void SetResponseBody(byte[] body)
450453 /// <summary>
451454 /// Replace the response body with the specified string.
452455 /// </summary>
453- /// <param name="body"></param>
456+ /// <param name="body">The body string to set. </param>
454457 public void SetResponseBodyString ( string body )
455458 {
456459 if ( ! WebSession . Request . Locked )
@@ -467,8 +470,8 @@ public void SetResponseBodyString(string body)
467470 /// Before request is made to server respond with the specified HTML string to client
468471 /// and ignore the request.
469472 /// </summary>
470- /// <param name="html"></param>
471- /// <param name="headers"></param>
473+ /// <param name="html">HTML content to sent. </param>
474+ /// <param name="headers">HTTP response headers. </param>
472475 public void Ok ( string html , Dictionary < string , HttpHeader > headers = null )
473476 {
474477 var response = new OkResponse ( ) ;
@@ -487,8 +490,8 @@ public void Ok(string html, Dictionary<string, HttpHeader> headers = null)
487490 /// Before request is made to server respond with the specified byte[] to client
488491 /// and ignore the request.
489492 /// </summary>
490- /// <param name="result"></param>
491- /// <param name="headers"></param>
493+ /// <param name="result">The html content bytes. </param>
494+ /// <param name="headers">The HTTP headers. </param>
492495 public void Ok ( byte [ ] result , Dictionary < string , HttpHeader > headers = null )
493496 {
494497 var response = new OkResponse ( ) ;
@@ -504,9 +507,9 @@ public void Ok(byte[] result, Dictionary<string, HttpHeader> headers = null)
504507 /// respond with the specified HTML string and the specified status to client.
505508 /// And then ignore the request.
506509 /// </summary>
507- /// <param name="html"></param>
508- /// <param name="status"></param>
509- /// <param name="headers"></param>
510+ /// <param name="html">The html content. </param>
511+ /// <param name="status">The HTTP status code. </param>
512+ /// <param name="headers">The HTTP headers. </param>
510513 /// <returns></returns>
511514 public void GenericResponse ( string html , HttpStatusCode status , Dictionary < string , HttpHeader > headers = null )
512515 {
@@ -522,9 +525,9 @@ public void GenericResponse(string html, HttpStatusCode status, Dictionary<strin
522525 /// Before request is made to server respond with the specified byte[],
523526 /// the specified status to client. And then ignore the request.
524527 /// </summary>
525- /// <param name="result"></param>
526- /// <param name="status"></param>
527- /// <param name="headers"></param>
528+ /// <param name="result">The bytes to sent. </param>
529+ /// <param name="status">The HTTP status code. </param>
530+ /// <param name="headers">The HTTP headers. </param>
528531 /// <returns></returns>
529532 public void GenericResponse ( byte [ ] result , HttpStatusCode status , Dictionary < string , HttpHeader > headers )
530533 {
@@ -539,7 +542,7 @@ public void GenericResponse(byte[] result, HttpStatusCode status, Dictionary<str
539542 /// <summary>
540543 /// Redirect to provided URL.
541544 /// </summary>
542- /// <param name="url"></param>
545+ /// <param name="url">The URL to redirect. </param>
543546 /// <returns></returns>
544547 public void Redirect ( string url )
545548 {
@@ -551,7 +554,10 @@ public void Redirect(string url)
551554 Respond ( response ) ;
552555 }
553556
554- /// a generic responder method
557+ /// <summary>
558+ /// Respond with given response object to client.
559+ /// </summary>
560+ /// <param name="response">The response object.</param>
555561 public void Respond ( Response response )
556562 {
557563 if ( WebSession . Request . Locked )
@@ -576,13 +582,16 @@ public void Respond(Response response)
576582 }
577583 }
578584
585+ /// <summary>
586+ /// Terminate the connection to server.
587+ /// </summary>
579588 public void TerminateServerConnection ( )
580589 {
581590 WebSession . Response . TerminateResponse = true ;
582591 }
583592
584593 /// <summary>
585- /// implement any cleanup here
594+ /// Implement any cleanup here
586595 /// </summary>
587596 public override void Dispose ( )
588597 {
0 commit comments