Skip to content

Instantly share code, notes, and snippets.

@nickgs
Created August 21, 2019 15:46
Show Gist options
  • Save nickgs/c5c547c9289d38592f0cd34d73ca8d0d to your computer and use it in GitHub Desktop.
Save nickgs/c5c547c9289d38592f0cd34d73ca8d0d to your computer and use it in GitHub Desktop.
ADC Product API Java example
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://www.adctoday.com/api/v1/product/700-11ABK")
.get()
.addHeader("User-Agent", "PostmanRuntime/7.15.2")
.addHeader("Accept", "*/*")
.addHeader("Cache-Control", "no-cache")
.addHeader("Host", "www.adctoday.com")
.addHeader("Accept-Encoding", "gzip, deflate")
.addHeader("Connection", "keep-alive")
.addHeader("cache-control", "no-cache")
.build();
Response response = client.newCall(request).execute();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment