set connect access token

This commit is contained in:
Luke Pulverenti
2014-09-02 22:30:05 -04:00
parent 6fd05670ac
commit a3d553a7fb
5 changed files with 33 additions and 11 deletions

View File

@@ -116,7 +116,7 @@
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition=" '$(ConfigurationName)' != 'Release Mono' " />
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" />
<PropertyGroup>
<PostBuildEvent Condition=" '$(ConfigurationName)' != 'Release Mono' ">if '$(ConfigurationName)' == 'Release' (
xcopy "$(TargetPath)" "$(SolutionDir)\Nuget\dlls\" /y /d /r /i

View File

@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
namespace MediaBrowser.Common.Net
@@ -111,5 +112,14 @@ namespace MediaBrowser.Common.Net
LogRequest = true;
}
public void SetPostData(IDictionary<string,string> values)
{
var strings = values.Keys.Select(key => string.Format("{0}={1}", key, values[key]));
var postContent = string.Join("&", strings.ToArray());
RequestContent = postContent;
RequestContentType = "application/x-www-form-urlencoded";
}
}
}