예제 #1
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="request"></param>
 /// <param name="message"></param>
 public static void WriteRequest(this HttpWebRequest request, ResourceRequest message)
 {
     request.Headers["Authorization"] = "WRAP access_token=\"" + message.AccessToken + "\"";
 }
예제 #2
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="request"></param>
 /// <param name="message"></param>
 public static void WriteRequest(this WebRequest request, ResourceRequest message)
 {
     var httpRequest = request as HttpWebRequest;
     if (null == httpRequest)
         throw new NotSupportedException("Only HttpWebRequests are supported.");
     httpRequest.WriteRequest(message);
 }