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

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