You will often want to access data from the Internet, for a variety of different reasons. REST is an incredibly popular format that web services use to expose information online. This recipe illustrates how to use the HttpWebRequest
class to access one such web service, Twitter.
Open PlayStation Mobile Studio and create a new project. You also need to add references to Sce.PlayStation.HighLevel.UI
, System.Xml
, and System.Xml.Linq
. You can download the full source code as Ch9_Example3
.
Open AppMain.cs
and replace the code there with the following code:
using System; using System.Collections.Generic; using Sce.PlayStation.Core; using Sce.PlayStation.Core.Graphics; using Sce.PlayStation.Core.Input; using Sce.PlayStation.HighLevel.UI; using System.IO; using System.Net; using System.Linq; using System.Xml.Linq; namespace Ch9_Example3 { public class Tweet { public string TweetText; public...