Skip to content

Instantly share code, notes, and snippets.

@whalebot-helmsman
Created June 17, 2013 23:00
Show Gist options
  • Save whalebot-helmsman/5801265 to your computer and use it in GitHub Desktop.
Save whalebot-helmsman/5801265 to your computer and use it in GitHub Desktop.
int gFetch( ne_request* request
, const std::string& filePath
, const CWebSpiderOptions& options
, CHttpResponse& response )
{
//checking input params
if (0 == request) {
return kNonHttpError;
}
//working
if ((NE_OK != requestResult) and (NE_REDIRECT != requestResult)) {
return httpStatusCode;
}
//working
if ((not options.m_bSavePages) and (not isBodyForParse)) {
return httpStatusCode;
}
//working
if (not getBody(request, filePath, response.m_tBody)) {
return kNonHttpError;
}
return httpStatusCode;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment