I have a backend app in Django for which we need to send some data by the frontend. Using cURL with php we do it in the following way:
<!DOCTYPE html>
<html>
<body>
<?php
$ch = curl_init("http://localhost:8000/auth/convert-token");
$s = 'some string';
curl_setopt($ch,CURLOPT_HTTPHEADER,array('Authorization: Bearer facebook '."$s"));
curl_setopt($ch,CURL_RETURNTRANSFER, False);
curl_exec($ch);
curl_close($ch);
?>
</body>
</html>
where $s is a variable. I want to know what can be the equivalent code in android to implement the same thing.