/// <summary> /// Makes POST on specified route /// </summary> /// <param name="client">object to be serialized</param> /// <param name="path">relative path or route name or template</param> /// <returns>Task of http response message</returns> public async Task <HttpResponseMessage> NewClient(ClientDTO client, string path = "NewClient") { var json = JsonConvert.SerializeObject(client); var data = new StringContent(json, Encoding.UTF8, "application/json"); return(await client.PostAsync(path, data)); }