Explorar o código

Merge pull request #15237 from charleswhchan/patch-3

Reformat /containers/(id)/resize to make it consistent with other sections.
Sebastiaan van Stijn %!s(int64=10) %!d(string=hai) anos
pai
achega
bba762b192
Modificáronse 1 ficheiros con 9 adicións e 4 borrados
  1. 9 4
      docs/reference/api/docker_remote_api_v1.21.md

+ 9 - 4
docs/reference/api/docker_remote_api_v1.21.md

@@ -698,9 +698,9 @@ Status Codes:
 
 ### Resize a container TTY
 
-`POST /containers/(id)/resize?h=<height>&w=<width>`
+`POST /containers/(id)/resize`
 
-Resize the TTY for container with  `id`. You must restart the container for the resize to take effect.
+Resize the TTY for container with  `id`. The unit is number of characters. You must restart the container for the resize to take effect.
 
 **Example request**:
 
@@ -712,6 +712,11 @@ Resize the TTY for container with  `id`. You must restart the container for the
       Content-Length: 0
       Content-Type: text/plain; charset=utf-8
 
+Query Parameters:
+
+-   **h** – height of `tty` session
+-   **w** – width
+
 Status Codes:
 
 -   **200** – no error
@@ -2110,12 +2115,12 @@ Status Codes:
 
 `POST /exec/(id)/resize`
 
-Resizes the `tty` session used by the `exec` command `id`.
+Resizes the `tty` session used by the `exec` command `id`.  The unit is number of characters.
 This API is valid only if `tty` was specified as part of creating and starting the `exec` command.
 
 **Example request**:
 
-    POST /exec/e90e34656806/resize HTTP/1.1
+    POST /exec/e90e34656806/resize?h=40&w=80 HTTP/1.1
     Content-Type: text/plain
 
 **Example response**: