Guest User

Fetch Contentful Entry JSON

a guest
Jul 21st, 2020
45
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. HttpClient httpClient = new HttpClient();
  2. ContentfulOptions options = new ContentfulOptions
  3. {
  4.     DeliveryApiKey = "Gg3vpa21vheFi28wzcPT7LDy3CgOEb0VJ62cGiPi0JQ",
  5.     PreviewApiKey = "aVrO8Fhmoq-hNEDa78_QHkeqKIxgG6-JhofdnNpCj00",
  6.     SpaceId = "qjiunow8a0ig"
  7. };
  8.  
  9. ContentfulClient client = new ContentfulClient(httpClient, options);
  10. JObject jObject = client.GetEntry<JObject>("7gRkxpacpEf7yLjL1ukb4G").GetAwaiter().GetResult();
  11. Console.WriteLine(jObject);
RAW Paste Data