/*
**
** 	Copyright (c) 2000-2004 ChoiceStream, Inc.  All Rights Reserved
**
**	ChoiceStream
**	210 Broadway
**	Cambridge, MA 02139
**
**  $Id: httprequest.cpp,v 1.4 2005/01/28 21:12:05 cweikart Exp $
**
**/
#include "csm_first.h"
#include "httprequest.h"
#include <string>
#include "csm_last.h"
using namespace csm;
using namespace std;
namespace csm {
   //NOTE: in the spirit of LWP, all of the configurable parameters of the 
   //httprequest are configured per request.
   //The ones below are the most commonly configured. Please over-ride them
   //using csconfig for your application.
   //If you need to configure a parameter not listed in the block below, please
   //contact Michael M or Marc
   
   //String telling the server what "browser" we are
   string userAgentDefault  = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)";
   //Do we follow redirects in headers?
   bool   redirectDefault   = false;
   // Max number of header redirects to follow
   int	  maxFollowDefault  = 7;
   //Connect Timeout used by curl.
    int	  connectTimeoutDefault    = 10; // TBD: something smaller?
   //Timeout used by curl. This doesn't work perfectly. If you need one that
   //does, used the httpclient in util/common/httpclient.*
   int	  timeoutDefault    = 10;
   //Do we use cookies? If we do, we need to set the cookieFile member
   //variable to a fully specified path to a file, or it won't work
   bool   useCookies	    = false;


   HttpRequest::HttpRequest():method(HTTP_GET), 
			      multipart(false),
			      userAgent(userAgentDefault),
			      connectTimeout(connectTimeoutDefault),
			      timeout(timeoutDefault),
			      useCookies(useCookies),
			      followRedirect(redirectDefault),
			      maxRedirectFollow(0){};
};

