private void AddHeader(HttpRequestMessage requestMessage, RestHeader header) { switch (header.Key) { case "Authorization": requestMessage.Headers.Authorization = AuthenticationHeaderValue.Parse(header.Value); break; case "Date": requestMessage.Headers.Date = DateTimeOffset.Parse(header.Value); break; case "Content-Type": break; default: requestMessage.Headers.Add(header.Key, header.Value); break; } }
public void AddDefaultHeader(RestHeader restHeader) { _defaultHeaders.Add(restHeader); }