build HTTP response