I happen to like using RestSharp over HttpWebRequest, so thought I'd add another version to the list:
// Build a client pointing to your sitecore instance
IRestClient restClient = new RestClient("http://gyldendal.local/");
// Add credentials to all future requests
restClient.AddDefaultHeader("X-Scitemwebapi-Username", @"sitecore\admin");
restClient.AddDefaultHeader("X-Scitemwebapi-Password", "b");
// Build a request to the item api
IRestRequest restRequest = new RestRequest("/-/item/v1/", Method.GET);
// specify API parameters
restRequest.AddParameter("sc_database", "master");
restRequest.AddParameter("sc_itemid", "{110D559F-DEA5-42EA-9C1C-8A5DF7E70EF9}");
#if DEBUG
Console.WriteLine( restClient.BuildUri(restRequest) ); // http://gyldendal.local/-/item/v1/?sc_database=master&sc_itemid={110D559F-DEA5-42EA-9C1C-8A5DF7E70EF9}
#endif
// Execute request
IRestResponse restResponse = restClient.Execute(restRequest);
// Confirm successful response
if (restRequest.StatusCode == HttpStatusCode.OK)
{
/* Work with restResponse.Content */
#if DEBUG
Console.WriteLine(restResponse.Content); // {"statusCode":200,"result":{....}}
#endif
}
Also, just so it's clear, confirm the itemwebapi has been enabled on your specific <site>. For a default install, you can use the following patch file to enable it:
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
<sitecore>
<sites>
<site name="website">
<!-- Options: Off|StandardSecurity|AdvancedSecurity -->
<patch:attribute name="itemwebapi.mode">StandardSecurity</patch:attribute>
<!-- Options: ReadOnly|ReadWrite -->
<patch:attribute name="itemwebapi.access">ReadOnly</patch:attribute>
<!-- Options: True|False -->
<patch:attribute name="itemwebapi.allowanonymousaccess">False</patch:attribute>
</site>
</sites>
</sitecore>
</configuration>