Пример #1
0
 /// <summary>
 /// Add querystrings from <see cref="IDictionary{string, string}"/>
 /// </summary>
 /// <param name="source"></param>
 /// <param name="data"></param>
 /// <param name="isValueEncoded"></param>
 /// <returns></returns>
 public static IHttpHaveQueryStrings QueryStrings(this IHttpCollectQueryStrings source, IDictionary <string, string> data, bool isValueEncoded = false)
 {
     return(source.QueryStrings(NameValueUnitCollectionMapper.FromDictionary(data), isValueEncoded));
 }
Пример #2
0
 /// <summary>
 /// Add headers to request from a <see cref="IDictionary{string, string}"/>
 /// </summary>
 /// <param name="source"></param>
 /// <param name="data"></param>
 /// <returns></returns>
 public static IHttpHaveHeaders Headers(this IHttpCollectHeaders source, IDictionary <string, string> data)
 {
     return(source.Headers(NameValueUnitCollectionMapper.FromDictionary(data)));
 }
Пример #3
0
 /// <summary>
 /// Add query strings to request url from a object.
 /// The method read all first level properties and their values and append as
 /// querystring with propertyname as querystring name and propertyvalue as query
 /// value if the value is not null.
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="source"></param>
 /// <param name="data"></param>
 /// <param name="isValueEncoded"></param>
 /// <returns></returns>
 public static IHttpHaveQueryStrings QueryStrings <T>(this IHttpCollectQueryStrings source, T data, bool isValueEncoded = false)
 {
     return(source.QueryStrings(NameValueUnitCollectionMapper.FromDto(data), isValueEncoded));
 }