In order to handle this case when using GCDAsyncSocket, I needed to split the initialization process for requests into two parts, which meant the receivedDataCallback also needed to change. This feels like a better approach anyway, as the request headers need to be parsed first in order to determine the formatting and size of the request body (especially to handle more complex situations).
Fixes issue discussed in #2
In order to handle this case when using
GCDAsyncSocket
, I needed to split the initialization process for requests into two parts, which meant thereceivedDataCallback
also needed to change. This feels like a better approach anyway, as the request headers need to be parsed first in order to determine the formatting and size of the request body (especially to handle more complex situations).