Http POST参数Awesomnium Post Parameters vb.net

时间:2015-07-03 00:43:41

标签: c# vb.net awesomium

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

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");
    }

但我不明白如何将其转换为vb.net代码 ,任何帮助?

谢谢

0 个答案:

没有答案