var axios = require('axios');
var data = JSON.stringify({
"image": "/9j/4AAQSkZJRgABAQEBLAEsAAD//gA7Q1JFQVR....."
});
var config = {
method: 'post',
url: 'api.cetery.com/api/plate/read',
headers: {
'Accept': 'application/json',
'Authorization': 'Bearer 1|Your token here',
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
$client = new http\Client;
$request = new http\Client\Request;
$request->setRequestUrl('api.cetery.com/api/plate/read');
$request->setRequestMethod('POST');
$body = new http\Message\Body;
$body->append('{
"image" : "/9j/4AAQSkZJRgABAQEBLAEsAAD....."
}');
$request->setBody($body);
$request->setOptions(array());
$request->setHeaders(array(
'Accept' => 'application/json',
'Authorization' => 'Bearer 1|Your token here',
'Content-Type' => 'application/json'
));
$client->enqueue($request)->send();
$response = $client->getResponse();
echo $response->getBody();
var client = new RestClient("api.cetery.com/api/plate/read");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer 1|Your token here");
request.AddHeader("Content-Type", "application/json");
var body = @"{" + "\n" +
@" ""image"" : ""/9j/4AAQSkZJRgABAQEBLAEsAAD//....."
@"}";
request.AddParameter("application/json", body, ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
{
"response_status": 200,
"matriculas": [
{
"matricula": "3326DMV",
"ymin": 216,
"xmin": 335,
"ymax": 273,
"xmax": 549
}
]
}