erlhttp
erlhttp copied to clipboard
Accumulating the body
What do you mean by "The parser will automatically accumulate the request body. To clear the results of the request body, e.g. after writing to a file, call.". Aren't the body chunk returned chunk by chiunk if ewe pass the data to the parser? Why accumulating?
Hi Benoit, I'm considering removing this as it can easily be done by the user of the library and might be confusing/unexpected.
The idea was to make it easy to read the whole body in a binary at once. If you read chunk by chunk you call clear_body_results after each chunk.
Hi sorry for the delay to answer. imo read ing thefull body should be an extra method. Ie you could expose the api to fetch the body by chunk and provide a body(...) function to read all body. I can provides you a patch if you want.