Skip to content

Commit 7e7e775

Browse files
committed
Documented changes to get_client_body_reader
1 parent b18622a commit 7e7e775

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -362,9 +362,12 @@ This is a convenience function allowing one to more easily use the generic inter
362362

363363
## get_client_body_reader
364364

365-
`syntax: reader, err = httpc:get_client_body_reader()`
365+
`syntax: reader, err = httpc:get_client_body_reader(chunksize?, sock?)`
366366

367-
Returns an iterator function which can be used to read the downstream client request body in a streaming fashion. For example:
367+
Returns an iterator function which can be used to read the downstream client request body in a streaming fashion. You may also specify an optional default chunksize (default is `65536`), or an already established socket in
368+
place of the client request.
369+
370+
Example:
368371

369372
```lua
370373
local req_reader = httpc:get_client_body_reader()
@@ -393,6 +396,8 @@ local res, err = httpc:request{
393396
}
394397
```
395398

399+
If `sock` is specified,
400+
396401
# Author
397402

398403
James Hurst <[email protected]>

0 commit comments

Comments
 (0)