Clone
Daniel Bevenius
committed
on 04 Jul 14
Adding payload to the Http2Client example.
Modifications:
When trying out the Http2Client example I noticed that adding a request
payload wo… Show more
Adding payload to the Http2Client example.

Modifications:

When trying out the Http2Client example I noticed that adding a request

payload would not cause a data frame to written. This seems to be

because writeHeaders completes the promise, and then the writeData

call ends up in FlowControlWriter.writeFrame, isDone is true and

the data released and the call aborted and returned.

Adding a new promise for the writeData method allows a data frame to be

written.

Result:

A body/payload can now be sent to the server. The example was updated to

simply echo the payload received back to the calling client.

Show less