RESTp - Get Columns of table Rest API to get columns of table

RESTp allows you to get columns of the table easily by specifying the GET parameter. You need to pass GET parameter op="columns" to get the columns.

  
                                //init curl
                                $ch = curl_init();
                                 //set http headers
                                curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type:application/json'));
                                // URL to be called
                                curl_setopt($ch, CURLOPT_URL, "http://pdocrud.com/RESTP/api/orders?op=columns");
                               //return as output instead of printing it
                                curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
                                //execute curl request
                                $result = curl_exec($ch);
                                //close curl connection
                                curl_close($ch);
                                //print result
                                print_r($result);
                            
  
                                jQuery(document).ready(function () {
                                    jQuery.ajax({
                                        url: "http://pdocrud.com/RESTP/api/orders?op=columns",
                                        success: function (response) {
                                            console.log(response);
                                            jQuery("#js_output").text(response);
                                        }
                                    });
                                });