mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-26 22:46:37 -04:00
21 lines
435 B
C#
21 lines
435 B
C#
using System;
|
|
|
|
namespace NzbDrone.Common.Http
|
|
{
|
|
public static class UriExtensions
|
|
{
|
|
public static void SetQueryParam(this UriBuilder uriBuilder, string key, object value)
|
|
{
|
|
var query = uriBuilder.Query;
|
|
|
|
if (query.IsNotNullOrWhiteSpace())
|
|
{
|
|
query += "&";
|
|
}
|
|
|
|
uriBuilder.Query = query.Trim('?') + (key + "=" + value);
|
|
}
|
|
|
|
|
|
}
|
|
} |