#if NET_2_0
static bool isDefaultWebProxySet;
static IWebProxy defaultWebProxy;
+ static RequestCachePolicy defaultCachePolicy;
#endif
// Constructors
#if NET_2_1
AddPrefix ("http", typeof (HttpRequestCreator));
AddPrefix ("https", typeof (HttpRequestCreator));
- #if MONOTOUCH
+ #if MOBILE
AddPrefix ("file", typeof (FileWebRequestCreator));
AddPrefix ("ftp", typeof (FtpRequestCreator));
#endif
#else
+ #if NET_2_0
+ defaultCachePolicy = new HttpRequestCachePolicy (HttpRequestCacheLevel.NoCacheNoStore);
+ #endif
#if NET_2_0 && CONFIGURATION_DEP
object cfg = ConfigurationManager.GetSection ("system.net/webRequestModules");
WebRequestModulesSection s = cfg as WebRequestModulesSection;
}
}
+ [MonoTODO ("Implement the caching system. Currently always returns a policy with the NoCacheNoStore level")]
public virtual RequestCachePolicy CachePolicy
{
- get {
- throw GetMustImplement ();
- }
+ get { return DefaultCachePolicy; }
set {
}
}
#if NET_2_0
public static RequestCachePolicy DefaultCachePolicy
{
- get {
- throw GetMustImplement ();
- }
+ get { return defaultCachePolicy; }
set {
throw GetMustImplement ();
}