There are various way to go about it but using /sockread -f isn't 'proper'.
-f will force the current content to be read even if it does not end with a terminated line, which is not what you want.
Why? Because if you get a slow connection and you only get half the expected content, -f will read that and read the rest after, where you would typically assume you have read two different lines.
You would then need to make sure you get the correct content yourself, which is a bit more complex..
If you don't use http 1.1 or if the socket is getting closed at the end, triggering on sockclose, a proper and easy way is to keep reading line by line with "sockread %data" (don't forget to check for $sockbr and to stop processing if you didn't read anything), and to read that last line which doesn't end with $crlf/$lf inside the on sockclose event.
Otherwise, on sockclose won't get triggered and there you need to make sure, as I said, that you read all the content correctly before processing it, for that you can read everything with sockread -f but you add what you read to a buffer, and you process that buffer once you have recieved all the data (use the Content-length value to know when you have read everything).