// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using Newtonsoft.Json; namespace osu.Framework.IO.Network { /// /// A web request with a specific JSON response format. /// /// the response format. public class JsonWebRequest : WebRequest { protected override string Accept => "application/json"; public JsonWebRequest(string url = null, params object[] args) : base(url, args) { } protected override void ProcessResponse() { if (ResponseStream != null) ResponseObject = JsonConvert.DeserializeObject(GetResponseString()); } public T ResponseObject { get; private set; } } }