Skip to main content

API - Asset Summary

code repository

To help you get started with the iWantFuel API quickly and confidently, we’ve created plug-and-play code samples across all major programming languages and libraries.

Whether you're building in PHP, Python, JavaScript, Java, or beyond, these examples are designed to simplify your development process.

At iWantFuel, our mission is to help you unlock the full power of our platform—while keeping integration seamless, secure, and developer-friendly.

Available Code Samples Include:

  • C# – HttpClient, RestSharp
  • cURL
  • Dart – dio, http
  • Go – Native
  • HTTP (raw)
  • Java – OkHttp, Unirest
  • JavaScript – Fetch, jQuery, XHR
  • Kotlin – OkHttp
  • C – libcurl
  • Node.js – Axios, Native, Request, Unirest
  • Objective-C – NSURLSession
  • OCaml – Cohttp
  • PHP – cURL, Guzzle, HTTP_Request2, pecl_http
  • PowerShell – Invoke-RestMethod
  • Python – http.client, Requests
  • R – httr, RCurl
  • Ruby – Net::HTTP, reqwest, Httpie
  • Shell – wget
  • Swift – URLSession

Start integrating with confidence—and bring seamless driver management to your platform today.

Sample Response

{
    "Client": "535",
    "Vehicle Reg": "CFM28000",
    "Total Fill-Ups": 35,
    "First Fill Date": "2024-08-22 18:13:08",
    "Last Fill Date": "2025-04-22 14:15:40",
    "Total Confirmed Litres": "2914.52",
    "Total Product Quantity": 0,
    "Total Ordered Quantity": 4031.3800000000001091393642127513885498046875,
    "Fuel Types Used": "Diesel 50 ppm",
    "Min Odometer": "140100.00",
    "Max Odometer": "2412265.00",
    "Distance Travelled": "2272165.00",
    "Avg L/100km": "0.00",
    "Sites Visited": 5,
    "Max Days Between Fills": "9"
}

C# - HttpClient

var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://www.iwantfuel.tech/api/Asset_Summary.php");
request.Headers.Add("X-API-KEY", "Enter your API Key Here");
request.Headers.Add("X-SECRET-KEY", "Enter your Secret Key Here");
var content = new StringContent("{\n  \"Asset_Registration_No\": \"CFM28000\"\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());

C# - RestSharp

var options = new RestClientOptions("https://www.iwantfuel.tech")
{
  MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("/api/Asset_Summary.php", Method.Post);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("X-API-KEY", "Enter your API Key Here");
request.AddHeader("X-SECRET-KEY", "Enter your Secret Key Here");
var body = @"{" + "\n" +
@"  ""Asset_Registration_No"": ""CFM28000""" + "\n" +
@"}";
request.AddStringBody(body, DataFormat.Json);
RestResponse response = await client.ExecuteAsync(request);
Console.WriteLine(response.Content);

cURL

curl --location 'https://www.iwantfuel.tech/api/Asset_Summary.php' \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: Enter your API Key Here' \
--header 'X-SECRET-KEY: Enter your Secret Key Here' \
--data '{
  "Asset_Registration_No": "CFM28000"
}'

Dart - dio

var headers = {
  'Content-Type': 'application/json',
  'X-API-KEY': 'Enter your API Key Here',
  'X-SECRET-KEY': 'Enter your Secret Key Here'
};
var data = json.encode({
  "Asset_Registration_No": "CFM28000"
});
var dio = Dio();
var response = await dio.request(
  'https://www.iwantfuel.tech/api/Asset_Summary.php',
  options: Options(
    method: 'POST',
    headers: headers,
  ),
  data: data,
);

if (response.statusCode == 200) {
  print(json.encode(response.data));
}
else {
  print(response.statusMessage);
}

Dart - http

var headers = {
  'Content-Type': 'application/json',
  'X-API-KEY': 'Enter your API Key Here',
  'X-SECRET-KEY': 'Enter your Secret Key Here'
};
var request = http.Request('POST', Uri.parse('https://www.iwantfuel.tech/api/Asset_Summary.php'));
request.body = json.encode({
  "Asset_Registration_No": "CFM28000"
});
request.headers.addAll(headers);

http.StreamedResponse response = await request.send();

if (response.statusCode == 200) {
  print(await response.stream.bytesToString());
}
else {
  print(response.reasonPhrase);
}

Go - Native

package main

import (
  "fmt"
  "strings"
  "net/http"
  "io"
)

func main() {

  url := "https://www.iwantfuel.tech/api/Asset_Summary.php"
  method := "POST"

  payload := strings.NewReader(`{
  "Asset_Registration_No": "CFM28000"
}`)

  client := &http.Client {
  }
  req, err := http.NewRequest(method, url, payload)

  if err != nil {
    fmt.Println(err)
    return
  }
  req.Header.Add("Content-Type", "application/json")
  req.Header.Add("X-API-KEY", "Enter your API Key Here")
  req.Header.Add("X-SECRET-KEY", "Enter your Secret Key Here")

  res, err := client.Do(req)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()

  body, err := io.ReadAll(res.Body)
  if err != nil {
    fmt.Println(err)
    return
  }
  fmt.Println(string(body))
}

HTTP

POST /api/Asset_Summary.php HTTP/1.1
Host: www.iwantfuel.tech
Content-Type: application/json
X-API-KEY: Enter your API Key Here
X-SECRET-KEY: Enter your Secret Key Here
Content-Length: 41

{
  "Asset_Registration_No": "CFM28000"
}

Java - OkHttp

OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"Asset_Registration_No\": \"CFM28000\"\n}");
Request request = new Request.Builder()
  .url("https://www.iwantfuel.tech/api/Asset_Summary.php")
  .method("POST", body)
  .addHeader("Content-Type", "application/json")
  .addHeader("X-API-KEY", "Enter your API Key Here")
  .addHeader("X-SECRET-KEY", "Enter your Secret Key Here")
  .build();
Response response = client.newCall(request).execute();

Java - Unirest

Unirest.setTimeouts(0, 0);
HttpResponse<String> response = Unirest.post("https://www.iwantfuel.tech/api/Asset_Summary.php")
  .header("Content-Type", "application/json")
  .header("X-API-KEY", "Enter your API Key Here")
  .header("X-SECRET-KEY", "Enter your Secret Key Here")
  .body("{\n  \"Asset_Registration_No\": \"CFM28000\"\n}")
  .asString();

JavaScript - Fetch

const myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
myHeaders.append("X-API-KEY", "Enter your API Key Here");
myHeaders.append("X-SECRET-KEY", "Enter your Secret Key Here");

const raw = JSON.stringify({
  "Asset_Registration_No": "CFM28000"
});

const requestOptions = {
  method: "POST",
  headers: myHeaders,
  body: raw,
  redirect: "follow"
};

fetch("https://www.iwantfuel.tech/api/Asset_Summary.php", requestOptions)
  .then((response) => response.text())
  .then((result) => console.log(result))
  .catch((error) => console.error(error));

JavaScript - jQuery

var settings = {
  "url": "https://www.iwantfuel.tech/api/Asset_Summary.php",
  "method": "POST",
  "timeout": 0,
  "headers": {
    "Content-Type": "application/json",
    "X-API-KEY": "Enter your API Key Here",
    "X-SECRET-KEY": "Enter your Secret Key Here"
  },
  "data": JSON.stringify({
    "Asset_Registration_No": "CFM28000"
  }),
};

$.ajax(settings).done(function (response) {
  console.log(response);
});

JavaScript - XHR

// WARNING: For POST requests, body is set to null by browsers.
var data = JSON.stringify({
  "Asset_Registration_No": "CFM28000"
});

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function() {
  if(this.readyState === 4) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://www.iwantfuel.tech/api/Asset_Summary.php");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.setRequestHeader("X-API-KEY", "Enter your API Key Here");
xhr.setRequestHeader("X-SECRET-KEY", "Enter your Secret Key Here");

xhr.send(data);

Kotlin - Okhttp

val client = OkHttpClient()
val mediaType = "application/json".toMediaType()
val body = "{\n  \"Asset_Registration_No\": \"CFM28000\"\n}".toRequestBody(mediaType)
val request = Request.Builder()
  .url("https://www.iwantfuel.tech/api/Asset_Summary.php")
  .post(body)
  .addHeader("Content-Type", "application/json")
  .addHeader("X-API-KEY", "Enter your API Key Here")
  .addHeader("X-SECRET-KEY", "Enter your Secret Key Here")
  .build()
val response = client.newCall(request).execute()

C - libcurl

CURL *curl;
CURLcode res;
curl = curl_easy_init();
if(curl) {
  curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "POST");
  curl_easy_setopt(curl, CURLOPT_URL, "https://www.iwantfuel.tech/api/Asset_Summary.php");
  curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
  curl_easy_setopt(curl, CURLOPT_DEFAULT_PROTOCOL, "https");
  struct curl_slist *headers = NULL;
  headers = curl_slist_append(headers, "Content-Type: application/json");
  headers = curl_slist_append(headers, "X-API-KEY: Enter your API Key Here");
  headers = curl_slist_append(headers, "X-SECRET-KEY: Enter your Secret Key Here");
  curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
  const char *data = "{\n  \"Asset_Registration_No\": \"CFM28000\"\n}";
  curl_easy_setopt(curl, CURLOPT_POSTFIELDS, data);
  res = curl_easy_perform(curl);
  curl_slist_free_all(headers);
}
curl_easy_cleanup(curl);

NodeJs - Axios

const axios = require('axios');
let data = JSON.stringify({
  "Asset_Registration_No": "CFM28000"
});

let config = {
  method: 'post',
  maxBodyLength: Infinity,
  url: 'https://www.iwantfuel.tech/api/Asset_Summary.php',
  headers: { 
    'Content-Type': 'application/json', 
    'X-API-KEY': 'Enter your API Key Here', 
    'X-SECRET-KEY': 'Enter your Secret Key Here'
  },
  data : data
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});

NodeJs - Native

var https = require('follow-redirects').https;
var fs = require('fs');

var options = {
  'method': 'POST',
  'hostname': 'www.iwantfuel.tech',
  'path': '/api/Asset_Summary.php',
  'headers': {
    'Content-Type': 'application/json',
    'X-API-KEY': 'Enter your API Key Here',
    'X-SECRET-KEY': 'Enter your Secret Key Here'
  },
  'maxRedirects': 20
};

var req = https.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function (chunk) {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });

  res.on("error", function (error) {
    console.error(error);
  });
});

var postData = JSON.stringify({
  "Asset_Registration_No": "CFM28000"
});

req.write(postData);

req.end();

NodeJs - Request

var request = require('request');
var options = {
  'method': 'POST',
  'url': 'https://www.iwantfuel.tech/api/Asset_Summary.php',
  'headers': {
    'Content-Type': 'application/json',
    'X-API-KEY': 'Enter your API Key Here',
    'X-SECRET-KEY': 'Enter your Secret Key Here'
  },
  body: JSON.stringify({
    "Asset_Registration_No": "CFM28000"
  })

};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});

NodeJs - Unirest

#import <Foundation/Foundation.h>

dispatch_semaphore_t sema = dispatch_semaphore_create(0);

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://www.iwantfuel.tech/api/Asset_Summary.php"]
  cachePolicy:NSURLRequestUseProtocolCachePolicy
  timeoutInterval:10.0];
NSDictionary *headers = @{
  @"Content-Type": @"application/json",
  @"X-API-KEY": @"Enter your API Key Here",
  @"X-SECRET-KEY": @"Enter your Secret Key Here"
};

[request setAllHTTPHeaderFields:headers];
NSData *postData = [[NSData alloc] initWithData:[@"{\n  \"Asset_Registration_No\": \"CFM28000\"\n}" dataUsingEncoding:NSUTF8StringEncoding]];
[request setHTTPBody:postData];

[request setHTTPMethod:@"POST"];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
  if (error) {
    NSLog(@"%@", error);
    dispatch_semaphore_signal(sema);
  } else {
    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
    NSError *parseError = nil;
    NSDictionary *responseDictionary = [NSJSONSerialization JSONObjectWithData:data options:0 error:&parseError];
    NSLog(@"%@",responseDictionary);
    dispatch_semaphore_signal(sema);
  }
}];
[dataTask resume];
dispatch_semaphore_wait(sema, DISPATCH_TIME_FOREVER);

Objective-C - NSURLSession

#import <Foundation/Foundation.h>

dispatch_semaphore_t sema = dispatch_semaphore_create(0);

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"https://www.iwantfuel.tech/api/add_driver.php"]
  cachePolicy:NSURLRequestUseProtocolCachePolicy
  timeoutInterval:10.0];
NSDictionary *headers = @{
  @"X-API-Key": @"Enter Your API Key Here",
  @"X-Secret-Key": @"Enter Your Secret Key Here",
  @"Content-Type": @"application/json"
};

[request setAllHTTPHeaderFields:headers];
NSData *postData = [[NSData alloc] initWithData:[@"{\n  \"first_name\": \"John\",\n  \"last_name\": \"Doe\",\n  \"Mobile_Number\": \"0821234567\",\n  \"dialing_code\": \"+27\",\n  \"int_num\": \"+27\",\n  \"active\": \"Yes\"\n}" dataUsingEncoding:NSUTF8StringEncoding]];
[request setHTTPBody:postData];

[request setHTTPMethod:@"POST"];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
  if (error) {
    NSLog(@"%@", error);
    dispatch_semaphore_signal(sema);
  } else {
    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
    NSError *parseError = nil;
    NSDictionary *responseDictionary = [NSJSONSerialization JSONObjectWithData:data options:0 error:&parseError];
    NSLog(@"%@",responseDictionary);
    dispatch_semaphore_signal(sema);
  }
}];
[dataTask resume];
dispatch_semaphore_wait(sema, DISPATCH_TIME_FOREVER);

OCaml - Cohttp

open Lwt
open Cohttp
open Cohttp_lwt_unix

let postData = ref "{\n  \"Asset_Registration_No\": \"CFM28000\"\n}";;

let reqBody = 
  let uri = Uri.of_string "https://www.iwantfuel.tech/api/Asset_Summary.php" in
  let headers = Header.init ()
    |> fun h -> Header.add h "Content-Type" "application/json"
    |> fun h -> Header.add h "X-API-KEY" "Enter your API Key Here"
    |> fun h -> Header.add h "X-SECRET-KEY" "Enter your Secret Key Here"
  in
  let body = Cohttp_lwt.Body.of_string !postData in

  Client.call ~headers ~body `POST uri >>= fun (_resp, body) ->
  body |> Cohttp_lwt.Body.to_string >|= fun body -> body

let () =
  let respBody = Lwt_main.run reqBody in
  print_endline (respBody)

PHP - cURL

<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://www.iwantfuel.tech/api/Asset_Summary.php',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
  "Asset_Registration_No": "CFM28000"
}',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/json',
    'X-API-KEY: Enter your API Key Here',
    'X-SECRET-KEY: Enter your Secret Key Here'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

PHP - Guzzle

<?php
$client = new Client();
$headers = [
  'Content-Type' => 'application/json',
  'X-API-KEY' => 'Enter your API Key Here',
  'X-SECRET-KEY' => 'Enter your Secret Key Here'
];
$body = '{
  "Asset_Registration_No": "CFM28000"
}';
$request = new Request('POST', 'https://www.iwantfuel.tech/api/Asset_Summary.php', $headers, $body);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();

PHP - HTTP_Request2

<?php
require_once 'HTTP/Request2.php';
$request = new HTTP_Request2();
$request->setUrl('https://www.iwantfuel.tech/api/Asset_Summary.php');
$request->setMethod(HTTP_Request2::METHOD_POST);
$request->setConfig(array(
  'follow_redirects' => TRUE
));
$request->setHeader(array(
  'Content-Type' => 'application/json',
  'X-API-KEY' => 'Enter your API Key Here',
  'X-SECRET-KEY' => 'Enter your Secret Key Here'
));
$request->setBody('{\n  "Asset_Registration_No": "CFM28000"\n}');
try {
  $response = $request->send();
  if ($response->getStatus() == 200) {
    echo $response->getBody();
  }
  else {
    echo 'Unexpected HTTP status: ' . $response->getStatus() . ' ' .
    $response->getReasonPhrase();
  }
}
catch(HTTP_Request2_Exception $e) {
  echo 'Error: ' . $e->getMessage();
}

PHP - pecl_http

<?php
$client = new http\Client;
$request = new http\Client\Request;
$request->setRequestUrl('https://www.iwantfuel.tech/api/Asset_Summary.php');
$request->setRequestMethod('POST');
$body = new http\Message\Body;
$body->append('{
  "Asset_Registration_No": "CFM28000"
}');
$request->setBody($body);
$request->setOptions(array());
$request->setHeaders(array(
  'Content-Type' => 'application/json',
  'X-API-KEY' => 'Enter your API Key Here',
  'X-SECRET-KEY' => 'Enter your Secret Key Here'
));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();

PowerShell - RestMethod

$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"
$headers.Add("Content-Type", "application/json")
$headers.Add("X-API-KEY", "Enter your API Key Here")
$headers.Add("X-SECRET-KEY", "Enter your Secret Key Here")

$body = @"
{
  `"Asset_Registration_No`": `"CFM28000`"
}
"@

$response = Invoke-RestMethod 'https://www.iwantfuel.tech/api/Asset_Summary.php' -Method 'POST' -Headers $headers -Body $body
$response | ConvertTo-Json

Python - http.client

import http.client
import json

conn = http.client.HTTPSConnection("www.iwantfuel.tech")
payload = json.dumps({
  "Asset_Registration_No": "CFM28000"
})
headers = {
  'Content-Type': 'application/json',
  'X-API-KEY': 'Enter your API Key Here',
  'X-SECRET-KEY': 'Enter your Secret Key Here'
}
conn.request("POST", "/api/Asset_Summary.php", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))

Python - Requests

import requests
import json

url = "https://www.iwantfuel.tech/api/Asset_Summary.php"

payload = json.dumps({
  "Asset_Registration_No": "CFM28000"
})
headers = {
  'Content-Type': 'application/json',
  'X-API-KEY': 'Enter your API Key Here',
  'X-SECRET-KEY': 'Enter your Secret Key Here'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

R - httr

library(httr)

headers = c(
  'Content-Type' = 'application/json',
  'X-API-KEY' = 'Enter your API Key Here',
  'X-SECRET-KEY' = 'Enter your Secret Key Here'
)

body = '{
  "Asset_Registration_No": "CFM28000"
}';

res <- VERB("POST", url = "https://www.iwantfuel.tech/api/Asset_Summary.php", body = body, add_headers(headers))

cat(content(res, 'text'))

R - RCurl

library(RCurl)
headers = c(
  "Content-Type" = "application/json",
  "X-API-KEY" = "Enter your API Key Here",
  "X-SECRET-KEY" = "Enter your Secret Key Here"
)
params = "{
  \"Asset_Registration_No\": \"CFM28000\"
}"
res <- postForm("https://www.iwantfuel.tech/api/Asset_Summary.php", .opts=list(postfields = params, httpheader = headers, followlocation = TRUE), style = "httppost")
cat(res)

Ruby - Net::HTTP

require "uri"
require "json"
require "net/http"

url = URI("https://www.iwantfuel.tech/api/Asset_Summary.php")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request["X-API-KEY"] = "Enter your API Key Here"
request["X-SECRET-KEY"] = "Enter your Secret Key Here"
request.body = JSON.dump({
  "Asset_Registration_No": "CFM28000"
})

response = https.request(request)
puts response.read_body

Ruby - reqwest

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = reqwest::Client::builder()
        .build()?;

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("Content-Type", "application/json".parse()?);
    headers.insert("X-API-KEY", "Enter your API Key Here".parse()?);
    headers.insert("X-SECRET-KEY", "Enter your Secret Key Here".parse()?);

    let data = r#"{
    "Asset_Registration_No": "CFM28000"
}"#;

    let json: serde_json::Value = serde_json::from_str(&data)?;

    let request = client.request(reqwest::Method::POST, "https://www.iwantfuel.tech/api/Asset_Summary.php")
        .headers(headers)
        .json(&json);

    let response = request.send().await?;
    let body = response.text().await?;

    println!("{}", body);

    Ok(())
}

Shell - Httpie

printf '{
  "Asset_Registration_No": "CFM28000"
}'| http  --follow --timeout 3600 POST 'https://www.iwantfuel.tech/api/Asset_Summary.php' \
 Content-Type:'application/json' \
 X-API-KEY:'Enter your API Key Here' \
 X-SECRET-KEY:'Enter your Secret Key Here'

Shell - wget

wget --no-check-certificate --quiet \
  --method POST \
  --timeout=0 \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: Enter your API Key Here' \
  --header 'X-SECRET-KEY: Enter your Secret Key Here' \
  --body-data '{
  "Asset_Registration_No": "CFM28000"
}' \
   'https://www.iwantfuel.tech/api/Asset_Summary.php'

Swift - URLSession

let parameters = "{\n  \"Asset_Registration_No\": \"CFM28000\"\n}"
let postData = parameters.data(using: .utf8)

var request = URLRequest(url: URL(string: "https://www.iwantfuel.tech/api/Asset_Summary.php")!,timeoutInterval: Double.infinity)
request.addValue("application/json", forHTTPHeaderField: "Content-Type")
request.addValue("Enter your API Key Here", forHTTPHeaderField: "X-API-KEY")
request.addValue("Enter your Secret Key Here", forHTTPHeaderField: "X-SECRET-KEY")

request.httpMethod = "POST"
request.httpBody = postData

let task = URLSession.shared.dataTask(with: request) { data, response, error in 
  guard let data = data else {
    print(String(describing: error))
    return
  }
  print(String(data: data, encoding: .utf8)!)
}

task.resume()