FileWebRequest
Contents
[
Hide
]FileWebRequest class
Provides implementation of the WebRequest abstract class to work with the file system. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument.
class FileWebRequest : public System::Net::WebRequest
Methods
Method | Description |
---|---|
void Abort() override | Aborts the current request. |
System::SharedPtr<IAsyncResult> BeginGetRequestStream(AsyncCallback, System::SharedPtr<Object>) override | Initiates an asynchronous operation to get a stream for writing data to the resource. |
System::SharedPtr<IAsyncResult> BeginGetResponse(AsyncCallback, System::SharedPtr<Object>) override | Initiates an asynchronous request for the resource. |
static System::SharedPtr<WebRequest> Create(String) | Creates a new instance of the WebRequest class using the specified URI. |
static System::SharedPtr<WebRequest> Create(System::SharedPtr<Uri>) | Creates a new instance of the WebRequest class using the specified URI. |
static System::SharedPtr<WebRequest> CreateDefault(System::SharedPtr<Uri>) | Creates a WebRequest descendant for the specified URI scheme. |
static System::SharedPtr<HttpWebRequest> CreateHttp(String) | Creates a new instance of the WebRequest class using the specified URI. |
static System::SharedPtr<HttpWebRequest> CreateHttp(System::SharedPtr<Uri>) | Creates a new instance of the WebRequest class using the specified URI. |
System::SharedPtr<IO::Stream> EndGetRequestStream(System::SharedPtr<IAsyncResult>) override | Waits until the specified asynchronous operation to get a stream completes. |
System::SharedPtr<WebResponse> EndGetResponse(System::SharedPtr<IAsyncResult>) override | Waits until the specified asynchronous request for the resource completes. |
virtual bool Equals(ptr) | Compares objects using C# Object.Equals semantics. |
static std::enable_if<IsSmartPtr<T1>::value&&IsSmartPtr<T2>::value, bool>::type Equals(T1 const&, T2 const&) | Compares reference type objects in C# style. |
static std::enable_if<!IsSmartPtr<T1>::value&&!IsSmartPtr<T2>::value, bool>::type Equals(T1 const&, T2 const&) | Compares value type objects in C# style. |
static bool Equals(float const&, float const&) | Emulates C#-style floating point comparison where two NaNs are considered equal even though according to IEC 60559:1989 NaN is not equal to any value, including NaN. |
static bool Equals(double const&, double const&) | Emulates C#-style floating point comparison where two NaNs are considered equal even though according to IEC 60559:1989 NaN is not equal to any value, including NaN. |
virtual bool FastCast(const Details::FastRttiBase&, void **) const | For internal purposes only. |
FileWebRequest(System::SharedPtr<Uri>) | Constructs a new instance. |
virtual System::SharedPtr<System::Net::Cache::RequestCachePolicy> get_CachePolicy() | Gets the cache policy. |
virtual System::String get_ConnectionGroupName() | Gets the name of the connection group. |
virtual int64_t get_ContentLength() | Gets the number of bytes of the request data to sent. |
String get_ContentType() override | Gets the MIME type of the request. |
virtual System::SharedPtr<ICredentials> get_Credentials() | Gets authentication information that is associated with the current request. |
static System::SharedPtr<IWebProxy> get_DefaultWebProxy() | Gets the global HTTP proxy. |
System::SharedPtr<WebHeaderCollection> get_Headers() override | Gets the collection of the HTTP headers. |
String get_Method() override | Gets the HTTP method. |
virtual bool get_PreAuthenticate() | Gets a value that indicates if the request must be pre-authenticated. |
static System::SharedPtr<Collections::Generic::List<System::SharedPtr<WebRequest::WebRequestPrefixElement>>> get_PrefixList() | Gets the prefix list. |
virtual System::SharedPtr<IWebProxy> get_Proxy() | Gets the HTTP proxy. |
System::SharedPtr<Uri> get_RequestUri() override | Returns the request URI. |
virtual int32_t get_Timeout() | Gets an amount of time in milliseconds after which the request will be timed out. |
virtual bool get_UseDefaultCredentials() | Gets a value that indicates if the ‘Credential’ property is equal to the ‘DefaultCredentials’ property. |
Detail::SmartPtrCounter * GetCounter() | Gets reference counter data structure associated with the object. |
virtual int32_t GetHashCode() const | Analog of C# Object.GetHashCode() method. Enables hashing of custom objects. |
virtual System::SharedPtr<System::IO::Stream> GetRequestStream() | Returns the stream for writing data to the resource. |
System::SharedPtr<WebResponse> GetResponse() override | Returns the web response associated with the current web request. |
virtual const TypeInfo& GetType() const | Gets actual type of object. Analog of C# System.Object.GetType() call. |
virtual bool Is(const TypeInfo&) const | Check if object represents an instance of type described by targetType. Analog of C# ‘is’ operator. |
void Lock() | Implements C# lock() statement locking. Call directly or use LockContext sentry object. |
virtual ptr MemberwiseClone() const | Analog of C# Object.MemberwiseClone() method. Enables cloning custom types. |
Object() | Creates object. Initializes all internal data structures. |
Object(Object const&) | Copy constructor. Doesn’t copy anything, really, just initializes new object and enables copy constructing subclasses. |
Object& operator=(Object const&) | Assignment operator. Doesn’t copy anything, really, just initializes new object and enables copy constructing subclasses. |
static bool ReferenceEquals(ptr const&, ptr const&) | Compares objects by reference. |
static std::enable_if<!IsSmartPtr<T>::value, bool>::type ReferenceEquals(T const&, T const&) | Compares objects by reference. |
static std::enable_if<!IsSmartPtr<T>::value, bool>::type ReferenceEquals(T const&, std::nullptr_t) | Reference-compares value type object with nullptr. |
bool ReferenceEquals(String const&, std::nullptr_t) | Specialization of Object::ReferenceEquals for case of string and nullptr. |
bool ReferenceEquals(String const&, String const&) | Specialization of Object::ReferenceEquals for case of strings. |
static bool RegisterPrefix(String, System::SharedPtr<IWebRequestCreate>) | Registers the WebRequest descendant for the specified URI. |
int RemovedSharedRefs(int) | Decreases shared reference count by specified value. |
virtual void set_CachePolicy(System::SharedPtr<System::Net::Cache::RequestCachePolicy>) | Sets the cache policy. |
virtual void set_ConnectionGroupName(System::String) | Sets the name of the connection group. |
virtual void set_ContentLength(int64_t) | Sets the number of bytes of the request data to sent. |
void set_ContentType(String) override | Sets the MIME type of the request. |
virtual void set_Credentials(System::SharedPtr<ICredentials>) | Sets authentication information that is associated with the current request. |
static void set_DefaultWebProxy(System::SharedPtr<IWebProxy>) | Sets the global HTTP proxy. |
void set_Headers(System::SharedPtr<WebHeaderCollection>) override | Sets the collection of the HTTP headers. |
void set_Method(String) override | Sets the HTTP method. |
virtual void set_PreAuthenticate(bool) | Sets a value that indicates if the request must be pre-authenticated. |
static void set_PrefixList(System::SharedPtr<Collections::Generic::List<System::SharedPtr<WebRequest::WebRequestPrefixElement>>>) | Sets the prefix list. |
virtual void set_Proxy(System::SharedPtr<IWebProxy>) | Sets the HTTP proxy. |
void set_Timeout(int) override | Sets an amount of time in milliseconds after which the request will be timed out. |
virtual void set_Timeout(int32_t) | Sets an amount of time in milliseconds after which the request will be timed out. |
virtual void set_UseDefaultCredentials(bool) | Sets a value that indicates if the ‘Credential’ property is equal to the ‘DefaultCredentials’ property. |
virtual void SetTemplateWeakPtr(uint32_t) | Set n’th template argument a weak pointer (rather than shared). Allows switching pointers in containers to weak mode. |
int SharedCount() const | Gets current value of shared reference counter. |
Object * SharedRefAdded() | Increments shared reference count. Shouldn’t be called directly; instead, use smart pointers or ThisProtector. |
int SharedRefRemovedSafe() | Decrements and returns shared reference count. Shouldn’t be called directly; instead, use smart pointers or ThisProtector. |
virtual String ToString() const | Analog of C# Object.ToString() method. Enables converting custom objects to string. |
static const TypeInfo& Type() | Implements C# typeof(System.Object) construct. |
void Unlock() | Implements C# lock() statement unlocking. Call directly or use LockContext sentry object. |
Detail::SmartPtrCounter * WeakRefAdded() | Increments weak reference count. Shouldn’t be called directly; instead, use smart pointers or ThisProtector. |
void WeakRefRemoved() | Decrements weak reference count. Shouldn’t be called directly; instead, use smart pointers or ThisProtector. |
virtual ~Object() | Destroys object. Frees all internal data structures. |
See Also
- Class WebRequest
- Namespace System::Net
- Library Aspose.Slides