Example #1
0
function processRequest($reqMethod, $reqData)
{
    switch ($reqMethod) {
        case 'GET':
            processGETRequest();
            break;
        case 'POST':
            processPOSTRequest($reqData);
            break;
        case 'DELETE':
            processDELRequest($reqData);
            break;
    }
}
function getOrderByTrackerID($trackerID)
{
    $url = 'http://localhost:8080/rest/orders/track/' . $trackerID;
    $result = processGETRequest($url);
    return $result;
}