Skip to content

Instantly share code, notes, and snippets.

View damirarh's full-sized avatar

Damir Arh damirarh

View GitHub Profile
var file = await Package.Current.InstalledLocation.GetFileAsync(@"\Assets\Text.txt");
file.CopyAsync(ApplicationData.Current.LocalFolder);
var file = await Package.Current.InstalledLocation.GetFileAsync(@"\Assets\Text.txt");
var text = await FileIO.ReadTextAsync(file);
<configuration>
<config>
<!-- Defines a common package repository for all solutions -->
<add key="repositoryPath" value=".\Packages" />
</config>
</configuration>
<!-- Line before the change -->
<NuGetExePath Condition=" '$(NuGetExePath)' == '' ">$(NuGetToolsPath)\NuGet.exe</NuGetExePath>
<!-- Line after the change -->
<NuGetExePath Condition=" '$(NuGetExePath)' == '' ">$(MSBuildThisFileDirectory)\NuGet.exe</NuGetExePath>
<!-- Line before the change -->
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
<!-- Line after the change (relative path must match your .nuget folder location after the move) -->
<Import Project="..\..\.nuget\NuGet.targets" Condition="Exists('..\..\.nuget\NuGet.targets')" />
var http = new HttpClient();
// GET request
var getRequest = "http://hroch486.icpf.cas.cz/cgi-bin/echo.pl?key=value";
var getResponse = await http.GetAsync(getRequest);
var getResult = await getResponse.Content.ReadAsStringAsync();
// POST request
var postUri = new Uri("http://hroch486.icpf.cas.cz/cgi-bin/echo.pl");
var postFields = new Dictionary<string, string>
{
{ "key", "value" }
MyWebView.NavigateToString(postResult);
MyWebView.Navigate(new Uri(getRequest));
public static void PostAndNavigate(this WebView webView, string requestUri, IEnumerable<KeyValuePair<string, string>> formFields)
{
var formElements = String.Join("",
formFields.Select(p => String.Format(@"<input type=""hidden"" value=""{0}"" name=""{1}"">", p.Value, p.Key)));
var html = String.Format(
@"<html>
<head>
<script type=""text/javascript"">
function Submit()
{{
var array = new string[] { };
var bindingList = new BindingList<string>(array);
bindingList.Add("test");