mirror of
https://github.com/cefsharp/CefSharp.git
synced 2026-12-05 11:42:36 +00:00
Core - Add IRequest.PostData setter
can be used with the new PostData public class request.PostData = new PostData();
This commit is contained in:
@@ -175,5 +175,14 @@ namespace CefSharp
|
||||
throw gcnew Exception(gcnew String(L"This IPostDataWrapper is readonly and cannot be modified."));
|
||||
}
|
||||
}
|
||||
|
||||
operator CefRefPtr<CefPostData>()
|
||||
{
|
||||
if (this == nullptr)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
return _postData.get();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -168,6 +168,15 @@ namespace CefSharp
|
||||
return _postData;
|
||||
}
|
||||
|
||||
void Request::PostData::set(IPostData^ postData)
|
||||
{
|
||||
ThrowIfDisposed();
|
||||
|
||||
ThrowIfReadOnly();
|
||||
|
||||
_request->SetPostData((CefSharp::PostData^)postData);
|
||||
}
|
||||
|
||||
bool Request::IsReadOnly::get()
|
||||
{
|
||||
ThrowIfDisposed();
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace CefSharp
|
||||
virtual property ReferrerPolicy ReferrerPolicy { CefSharp::ReferrerPolicy get(); }
|
||||
virtual property NameValueCollection^ Headers { NameValueCollection^ get(); void set(NameValueCollection^ url); }
|
||||
virtual property TransitionType TransitionType { CefSharp::TransitionType get(); }
|
||||
virtual property IPostData^ PostData { IPostData^ get(); }
|
||||
virtual property IPostData^ PostData { IPostData^ get(); void set(IPostData^ postData); }
|
||||
virtual property bool IsReadOnly { bool get(); }
|
||||
virtual void InitializePostData();
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace CefSharp
|
||||
/// <summary>
|
||||
/// Create a new <see cref="IPostDataElement"/> instance
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
/// <returns>PostDataElement</returns>
|
||||
IPostDataElement CreatePostDataElement();
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -86,7 +86,7 @@ namespace CefSharp
|
||||
/// <summary>
|
||||
/// Post data
|
||||
/// </summary>
|
||||
IPostData PostData { get; }
|
||||
IPostData PostData { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Get the transition type for this request.
|
||||
|
||||
Reference in New Issue
Block a user