Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/279.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/vb.net/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# Http POST参数Awesomnium POST参数vb.net_C#_Vb.net_Awesomium - Fatal编程技术网

C# Http POST参数Awesomnium POST参数vb.net

C# Http POST参数Awesomnium POST参数vb.net,c#,vb.net,awesomium,C#,Vb.net,Awesomium,我想用Awesomnium控件发布数据-vb.net 我创建了这个用c#编写的代码: 但我不明白如何将其转换为vb.net代码 有什么帮助吗 谢谢最不明显的问题可能是事件wireup(WebCore.Started+=WebCoreOnStarted)-使用“AddHandler WebCore.Started,AddressOf WebCoreOnStarted”最不明显的问题可能是事件wireup(WebCore.Started+=WebCoreOnStarted)-使用“AddHandle

我想用Awesomnium控件发布数据-vb.net
我创建了这个用c#编写的代码:

但我不明白如何将其转换为vb.net代码 有什么帮助吗


谢谢

最不明显的问题可能是事件wireup(WebCore.Started+=WebCoreOnStarted)-使用“AddHandler WebCore.Started,AddressOf WebCoreOnStarted”最不明显的问题可能是事件wireup(WebCore.Started+=WebCoreOnStarted)-使用“AddHandler WebCore.Started,AddressOf WebCoreOnStarted”
public class CustomResourceInterceptor : ResourceInterceptor
{
    protected override ResourceResponse OnRequest(ResourceRequest request)
    {
        request.Method = "POST";
        var bytes = "Appending some text to the request";
        request.AppendUploadBytes(bytes, (uint) bytes.Length);
        request.AppendExtraHeader("custom-header", "this is a custom header");

        return null;
    }
}


public MainWindow()
{
    WebCore.Started += WebCoreOnStarted;
    InitializeComponent();
}

    private void WebCoreOnStarted(object sender, CoreStartEventArgs coreStartEventArgs)
    {
        var interceptor = new CustomResourceInterceptor();

        WebCore.ResourceInterceptor = interceptor;
        //webView is a WebControl on my UI, but you should be able to create your own WebView off WebCore
        webView.Source = new Uri("http://www.google.com");
    }