You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 18, 2022. It is now read-only.
using (var client = new WebClient())
{
client.BaseAddress = "url-with-user-and-password/jsonrpc";
var nzbName = Path.GetFileName(nzb);
nzbName = nzbName.Split('{')[0].TrimEnd('-');
var nzbContentBytes = File.ReadAllBytes(nzb);
var nzbContent = Convert.ToBase64String(nzbContentBytes);
// it will be:
// {"method":"append","params":["My.nzb","CONTENT OF nzbContent here","",0,False,True,"",0,"'SCORE'",[('*unpack:', 'yes')]]}
var formattedUploadCmd = uploadCmd.Replace("%NZB_NAME%", nzbName).Replace("%NZB_CONTENT%", nzbContent);
var response = client.UploadStringTaskAsync(url, "POST", formattedUploadCmd).ConfigureAwait(true).GetAwaiter().GetResult();
}
I use C# code to upload nzb to nzbget
the error I got is:
I tried to add quotes to True/False params, to integer numbers but I got same error
Don't know where is my mistake
The text was updated successfully, but these errors were encountered: