// Copyright (c) sim1222 . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System.Collections.Generic; using System.Net.Http; using Newtonsoft.Json; using osu.Framework.IO.Network; using osu.Framework.Logging; namespace osu.Game.Online.MisskeyAPI.Requests.Notes { public class Create : APIRequest { private string text; private string i; public Create(string i, string Text) { this.text = Text; this.i = i; } private class ReqBody { public string? text; public string? i; }; protected override WebRequest CreateWebRequest() { var req = base.CreateWebRequest(); req.Method = HttpMethod.Post; var body = new ReqBody() { text = text, i = i }; var json = JsonConvert.SerializeObject(body); Logger.Log(json, LoggingTarget.Network, LogLevel.Debug); req.AddRaw(json); return req; } protected override string Target => @"notes/create"; // protected override string Uri => @"https://apicheck.sim1222.workers.dev/notes/create"; } }