{
"products" : [
{
"id": "1044",
"name": "Apple iPhone 6 16GB Space Grey",
"slug": "apple-iphone-6-16gb-space-grey",
"specs": {
"os": "IOS 8.1",
"familyOs": "Apple iOS",
"weight": "129g",
"size": "138 x 67 x 7mm",
"height": "138mm",
"width": "67mm",
"depth": "7mm",
"screenSize": "5 inches",
"screenPixelDensity": "326 ppi density",
"screenResolution": "1334 x 750 pixels",
"simType": "Nano SIM",
"displayType": "LED-backlit IPS LCD",
"handsetStyle": "Touchscreen",
"cameraFront": "8MP",
"cameraBack": "1.2MP",
"cameraFlash": "Dual-LED (dual tone) flash",
"batteryType": "Non-removable Li-Po",
"batteryCapacity": "1810mAh",
"chipset": "Apple A8",
"gpu": "PowerVR GX6450",
"cpu": "Dual-core 1.4 GHz Typhoon (ARM v8-based)",
"nfc": "Yes (Apple Pay only)",
"sensors": "Fingerprint, accelerometer, gyro, proximity, compass, barometer",
"fmRadio": "No",
"4g": "Yes"
}
}
]
}
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.uconvert.co.uk/deals/v1/products/?expand=products(specs)",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
"x-api-key: 123456"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
curl --request GET \
--url 'https://api.uconvert.co.uk/deals/v1/products/?expand=products(specs)' \
--header 'x-api-key: 123456'
var settings = {
"async": true,
"crossDomain": true,
"url": "https://api.uconvert.co.uk/deals/v1/products/?expand=products(specs)",
"method": "GET",
"headers": {
"x-api-key": "123456"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
require 'uri'
require 'net/http'
url = URI("https://api.uconvert.co.uk/deals/v1/products/?expand=products(specs)")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '123456'
response = http.request(request)
puts response.read_body