Testing HTTP connections and Rest APIs can easily be done using Postman. This handy tool allows you to provide HTTP headers, among many other things, to test connections and view responses.
Here’s a test of querying a Rest API from restdb.io. The query URL is https://testdb-cd69.restdb.io/rest/people. For authentication, an HTTP header called “x-apikey” is provided with its value (redacted). The response from the call is in the body panel in JSON format.
If you have a webhook or form that makes an http request to another system, you can test the request and see the response easily using httpbin.org.
For example, if you have a form that posts data, you can set the action attribute’s value to https://httpbin.org/post. Then, submit the form and you will see what the posts data looks like. This is great for testing.
If you need a quick and easy way to create a CMS (content management system) or a database backend for an app, then Restdb.io will amaze! Here are some features:
super developer-friendly with crystal clear documentation
affordable and even has a free plan
example code for popular programming languages, including client side JavaScript and server side NodeJS, which makes it quick to get up and running
webhooks whenever a record is created, updated or deleted
codehooks to run custom code before and after a record is created, updated or deleted, e.g. for data normalizing and validation. codehooks also support scheduled tasks like cron jobs.
auto-generate test data to seed a table
ability to import data from a CSV file
native and custom field validation
non-technical users can log in and add/edit/delete records using intuitive forms and controls without seeing any developer features
ability to upload and host images and files
Below is a tutorial on how to create a simple CRUD (Create, Read, Update, Delete) app using Restdb.io with a PHP backend.
1. Log in to Restdb.io account and create a table (collection)
After you log in, you’ll need to be in Developer Mode to create a table. When creating fields in the table, Restdb.io offers numerous field property options including native and custom field validation.
2. Add or import data
To populate the table, you can
Add data field by field, row by row
Import data from a CSV file
Auto-generate data by clicking on the Test Data tab
Using the Test Data option, I chose to generate 5 rows which gave me this.
3. Get sample CRUD code
Click on [Table] > API Docs and choose a language to see sample code for
The sample PHP CRUD code provided by RestDB.io requires the use of the HttpRequest PEAR PECEL HTTP_Request extension. To avoid having to install this dependency, you can just use cURL which is included with PHP.
NodeJS
Below is a screenshot using NodeJS using the Request library.
JavaScript using jQuery AJAX
You can also perform CRUD actions using client-side JavaScript but you need to set up CORS (cross-origin resource sharing). The example below shows JavaScript using jQuery AJAX.
For client-side JavaScript, you need to generate a CORS API key. The screenshot below shows a CORS API key (redacted) that allows connections from any origin server but only allows the GET method to read data.
In the screenshot above, the API key would only work for the “people” table / collection. To have one key work for all tables / collections, use “/**” instead.
4. PHP: Create a file to test reading from the database
I created a test file called read-curl.php which uses cURL to connect to the remote database.
After uploading it to my web host, opening the file in a browser shows me the data in JSON format, as expected, which you can see live at http://zabuun.com/restdb.io/read-curl.php
You can also test the API by installing Postman (free), entering a query in the form of a REST URL, and entering your API key as an HTTP header.
4. JavaScript (jQuery + AJAX): Create a file to test reading from the database
I created a test file called read.html with the following code. This code uses the CORS key for cross-origin resource sharing.
After uploading it to my web host, opening the file in a browser shows me the data in JSON format, as expected, which you can see live at http://zabuun.com/restdb.io/read.html
If you have JSON data as in the example above, you can use Handlebars.JS to format the output in HTML.
5. Query data
When reading data from RestDB , you will often want to filter data based on conditions rather than retrieve an entire collection (all records). RestDB supports many MongoDB-like query syntax. Read the docs. Here’s an example of RestDB queries for equivalent relational DB SQL queries.
You can also aggregate data, e.g. min, max, avg, count, groupby, etc, using aggregation and grouping functions. Read the docs.
If you already have an entire JSON dataset and you want to query against it, you can use JSONata. JSONata is a lightweight query and transformation language for JSON data.
6. Auto-generate a web form
If you want to create a web form for public use, you can have restdb.io auto-generate one for you, complete with JavaScript validation and code to publish the data to your restdb.io database. See an example at
Below is a screenshot of my remote filesystem on a shared GoDaddy server. The error.log file is auto-generated.
8. Create users with editor access
If you work with other developers or editors, you can give them role-based access to your restdb.io account to manage data. An editor, for example, will not see the developer features and can simply add records using a user-friendly web form like shown below.
Put a couple tablespoons of olive oil in an 8 inch pan on medium heat
Put in 4 eggs making sure not to break the yolk
Sprinkle salt and pepper. Cumin is good, too.
Using a flipper, inspect the bottom of the eggs along the perimeter occasionally until it’s slightly brown and the egg pancake, if you will, is firm. Personally, I like my egg yolks half cooked.
Remove to a plate
Eating method
Personally, I don’t like to break the yolk cuz that’s messy. I’d eat the egg white separately and each entire egg yolk separately.
Let’s say you’ve taken a screenshot of some text and you’d like to highlight part of the text. By using different blending modes, this becomes an easy task. Here’s how to do it.
1. Open the screenshot containing text in Photoshop and select the text you want to highlight
2. Create a new layer and fill it with yellow
3. Change the blending mode to darken or any other one you like to create the highlighted text.
I’ve tried various types of tillers that you can rent from Home Depot. The light duty mantis tillers and mid tine are really only good for soft dirt.
MTA Rear Tine Tiller (Model # FRC800K1A-656912)
This tiller is heavy duty and can break up hard clay BUT both the wheels and the tines move forward so unless the tines are partially underground breaking the dirt, you can easily be pulled forward and lose control of the machine. Though this is a heavy duty machine, I find it less easy to control compared to the Barreto Hydraulic tiller.
Barreto Hydraulic Tiller (Model # E1320HX)
This tiller is big and heavy but it’s easy to use, easy to control, and will destroy clay and hard dirt. The rear tines move in the opposite direction of the wheels so the machine never runs away from you moving you forward out of control. It’s the most expensive to rent, but the time savings and ease of use make it worth it. I personally recommend this tiller over all the others.
Last week I made an egg sandwich with spinach, smoked sliced beef brisket, cheddar cheese and ciabatta bread. It was good but messy as the ingredients kept falling out as I’d eat it. Also, it wasn’t easy tasting all of the ingredients with every bite since they’d move around while holding the sandwich.
Since the sandwich would end up all mixed up in your mouth and stomach, I figured why not just mix all the ingredients up in a pan. It turns out this was not only much easier to cook and eat but also tastier as you could taste more of the ingredients.
Here’s the recipe:
Ingredients:
pita bread (available at Costco)
potatoes (optional)
pre-cooked tater tots
pre-cooked chopped baby potatoes
chopped tomatoes
diced onions
diced red, green and yellow bell pepper (can get it pre-diced and frozen)
diced jalapeno peppers
baby spinach
shredded cheddar cheese
pre-cooked smoked sliced beef brisket (available at Costco)
3 eggs
maybe broccoli?
Instructions:
If the bread is a bit hard, warm it up in the microwave for 50 secs to soften it.
Pour / spray cooking on in a pan and turn the heat up to medium
Put in all ingredients except eggs and mix for a minute or so
Put in eggs and mix for a minute.
I prefer my eggs half cooked with the yolk still wet so I’d turn off the heat and transfer everything to a play in time for the yolk to remain wet.
To eat, you can stuff the pita bread with the egg scramble though it may be hard separating the two sides of the bread without breaking it. Otherwise, just rip pieces of pita bread and scoop up some of the eggs scramble with it as you would for curry.
To save time in the morning, prepare everything the night before.
Add all ingredients except eggs in a zip lock bag and put in freezer
In the morning, transfer frozen ingredients to a bowl and defrost in microwave
Do you have to wash your feet in wudhu (ablution) or can you wipe it?
Many Muslims, especially Sunnis, believe that they must wash their feet when performing wudhu. However, the Quran makes it clear that the feet are to be wiped. Consider verse 5:6.
O you who have believed, when you rise to [perform] prayer, wash your faces and your hands to the elbows and wipe your heads and your feet to the ankles. (5:6)
As you can see, any reasonable person would understand the above verse to indicate that the feet are to be wiped and not necessarily washed. If it were so important for believers to wash their feet instead of wipe them, it would make sense for God to have grouped the feet part of the verse with the face and hand washing part instead of with the head-wiping part. Or, God could have added the word “wash” right before the word “feet” to make it clear that the feet must be washed.
How many steps are there in performing ablution (wudhu)?
Most Muslims think there are more than 4 steps to perform ablution (wudhu). However, the Quran makes it very clear in verse 5:6 that there are exactly 4 steps:
O you who have believed, when you rise to [perform] prayer, wash your faces and your hands to the elbows and wipe your heads and your feet to the ankles. (5:6)
Some Muslims insist that you must do more such as wash the inside of your mouth, clear your nostrils, wipe your neck, etc. Though it’s probably okay to do these things, one must not say that these additional steps are required since nowhere in the Quran does it require them. Believing that these extra steps are required and telling others that these extra steps are required constitutes belief in an Islamic law that God never approved. Therefore, to be safe and correct, one should not add to the steps clearly specified in the Quran and just stick to the 4 steps. If one feels that they need to wash their mouths or clear their nostrils or wipe their necks, they can do that before performing ablution (wudhu). They can also take a bath or shower before performing ablution (wudhu) as well.
How many times must you perform each step in ablution (wudhu)?
Most Muslims think that they must perform each step of ablution (wudhu) three times as if doing it less or more than three times invalidates the ablution. However, the Quran never mentions a specific number of steps required to perform ablution. Therefore, you are free to perform each step as many times as you want. Also, you are forbidden from telling others that they are required to perform each step a specific number of times since God never required any specific number.
O you who have believed, when you rise to [perform] prayer, wash your faces and your hands to the elbows and wipe your heads and your feet to the ankles. (5:6)
Following is proof that Muslims must study the Quran in an effort to understand it and that simply deferring matters of Islamic to other people, e.g. the Ulama, is not allowed.
Is it better to memorize the Quran or to read the Quran?
Many Muslims go through the huge effort of memorizing the Quran, even if they don’t speak Arabic. In general, many Muslims are also very impressed to hear of someone who has memorized the entire Quran. Sadly, when you ask these people if they understand what they memorized, they say they don’t understand it. In other words, many of these people have managed to memorize the sounds of the Arabic Quran without understanding the meaning of what they’ve spent so much time trying to memorize. According to verse 2:2, the Quran is a guide for people who believe in God.
Then do they not study / think deeply about / understand (yatadabbaruna) the Qur’an, or are there locks upon [their] hearts? (47:24)
While there is nothing wrong with memorizing the Quran, it should be clear that understanding the meaning of the Quran should be a priority. After all, how can you be guided by a book that contains guidance if you don’t understand what you are reading, let alone have memorized?
Is it better to read the Arabic Quran or a translation?
Many non-Arabic-speaking Muslims diligently read the Arabic Quran throughout their lives. Sadly, most of them have no idea of the meaning of the words they read. As such, it doesn’t seem fitting to even say that they are “reading” the Quran since “reading” implies an understanding of the words being read. As such, a possibly more appropriate description of their actions is that they are “making the sounds of the Arabic Quran.” The word Qur’an is an Arabic word that translates to “Reading” in English. It is called as such because it’s supposed to be read. In addition to reading it, God expects you to think deeply about it and understand it (47:24).
This is the Book about which there is no doubt, a guidance for those conscious of Allah – (2:2)
Obviously, in order to be “guided”, you need to understand the meaning of the guide. And obviously, you can understand a guide if you don’t understand the language of that guide. Therefore, it should be obvious that non-Arabic speakers will benefit most from reading a translation of the Quran to satisfy verse 47:24 and be “guided.” People don’t magically get guidance by reading a book they don’t understand. If one feels it important to read the Arabic Quran, they can read both the Arabic version and a translated version side by side.
Are you allowed to sing the Quran?
Many Muslims think that it is better to recite the Quran with a certain intonation. The resulting effect can be somewhat like they are singing a song with or without instruments.
There doesn’t appear to be any ruling against singing the Quran. However, one should keep in mind the purpose of the Quran and what God expects everyone to do with it. As stated earlier, the Quran is a book of guidance (2:2) and God expects everyone to read, understand, and think deeply about it (47:24).
QURAN — UNDERSTANDING
The Quran forbids you from following or believing in something without understanding it
In verse 17:36, God clearly tells people not to follow and believe in what they have no knowledge of. For example, if someone tells you that Muslim men are forbidden from wearing gold and silk, then you shouldn’t just believe what they say, regardless of whether they are learned scholars or imams. You must know what you are doing so that you are not guilty of becoming a blind believer. Examples of blind believers are idol worshippers of the time of Prophet Abraham. When Abraham proved to them, including his own father, that the idols were not God, and told them to stop worshipping them, they refused saying that they wanted to continue worshipping whatever their forefathers worshipped, even though they had no proof that their idols were God.
And do not pursue that of which you have no knowledge. Indeed, the hearing, the sight and the heart – about all those [one] will be questioned. (17:36)
As a Muslim, do you have to understand the Quran?
Many Muslims believe that they can just read the Quran without understanding and thinking deeply about its verses. However, God says in verse 47:24 that you are expected to study and think deeply about its verses. The expectation that you understand the Quran is so serious that not doing it is as if your heart was locked up. This expectation is very rational. After all, if you don’t understand the Quran, then your practice of Islam would be based on assumption rather than proof. Furthermore, since verse 17:36 forbids you from blindly following what people tell you without your own personal knowledge or proof of a matter, one obvious way to acquire knowledge of Islamic matters is by studying and thinking deeply about the Quran.
Then do they not study / think deeply about / understand the Qur’an, or are there locks upon [their] hearts? (47:24)
Note the keyword “yatadabbaruun” in this verse which is defined in the Edward Lane’s Lexicon as follows (highlighted).
QURAN — FOLLOWING / JUDGING BY OTHER THAN IT
God forbids people from following any law except God’s laws in the Quran
This is understandable and is proven in verse 6:114. The Quran is the word of God. Other books, e.g. the book of Prophet Muhammad’s sayings (hadith), are not from God but from humans (e.g. indirectly via a chain of people who claim they heard Muhammad say something). Muhammad is not God. Muhammad has no right or authority to make Islamic law. And God never gave Muhammad the authority to make Islamic law as we will prove below.
[Say], “Then is it other than Allah I should seek as judge while it is He who has revealed to you the Book explained in detail?” … (6:114)
Whoever judges by other than the Quran, they are wrongdoers and Kafir (disbelievers)
Many people, usually very religious people, like to tell others that something is haram. Unfortunately, their justification of their statements is based on the supposed sayings of Prophet Muhammad (hadith) and not the Quran. For example, some people tell others that men are forbidden from wearing gold and silk. This information is found in the hadith but you will never find it in the Quran. According to verse 5:45, these people who judge by the hadith think that they are doing the right thing and are very religious but in actuality, God considers them wrongdoers.
… And whoever does not judge by what Allah has revealed – then it is those who are the disbelievers. (5:45)
In addition to being wrongdoers, in verse 5:44 God even considers them to be disbelievers (kafir). This verse indicates that
God sent down the Torah
The prophets, Jewish rabbis and scholars used it to judge the Jews
There is no mention of the man-made Jewish Talmud book containing supposed sayings (hadith) of prophet Moses nor opinions of rabbis to be used in place of or in conjunction with the Torah for matters of Jewish law. The same, obviously, would apply to the Quran.
Indeed, We sent down the Torah, in which was guidance and light. The prophets who submitted [to Allah ] judged by it for the Jews, as did the rabbis and scholars by that with which they were entrusted of the Scripture of Allah, and they were witnesses thereto. So do not fear the people but fear Me, and do not exchange My verses for a small price. And whoever does not judge by what Allah has revealed – then it is those who are the disbelievers. (5:44)
Regarding matters of religion, do not follow or believe in hadith besides the Quran
Verses 45:6 and 77:50 should be sufficient proof for everyone that only the Quran, which is God’s sayings (hadith) should be followed and believed in. Any saying (hadith) after that should not be believed in let alone followed as supplementary or overriding laws in the Quran.
People who convert to Submission (Islam) are told to say the following sentence:
أشهد أن لا إله إلاَّ الله و أشهد أن محمد رسول الله
I bear witness that there is no god but God and I bear witness that Muhammad is God’s messenger.
While it is true that Muhammad was a messenger of God, we must not forget that he was not the only messenger of God and that all messengers of God are to be treated equally (2:136). Many Submitters (Muslims) today think of Muhammad exclusively or as a superior messenger compared to all other messengers. For example, in mosques you will often find Muhammad’s name next to God’s name and nowhere will you find the names of the other messengers including Abraham, the founder of Submission (Islam). When Submitters (Muslims) pray, near the end of the prayer they often ask for blessings on both Muhammad and Abraham. However, this too seems limiting considering that true believers must treat all messengers equally. According to verse 3:13, God tells us how to bear witness in submission to Him.
God witnesses that there is no deity except Him, and [so do] the angels and those of knowledge – [that He is] maintaining [creation] in justice. There is no deity except Him, the Exalted in Might, the Wise. (3:18)
This verse doesn’t mention Muhammad. This makes sense since we know from 22:78 that Submitters (Muslims) existed before Muhammad existed, e.g. Abraham, Moses, Jesus, and many of their followers.
In verse 27:44, we see an example of how the ruler of Sheba converted to Submission (Islam) and become a Submitter (Muslim). All she said was, “I submit to God, Lord of the Worlds.”
She was told, “Enter the palace.” But when she saw it, she thought it was a body of water and uncovered her shins [to wade through]. He said, “Indeed, it is a palace [whose floor is] made smooth with glass.” She said, “My Lord, indeed I have wronged myself, and I submit with Solomon to God, Lord of the worlds.” (27:44)
We also know from 49:14 that one can be a Submitter (Muslim) before being a Believer (Mu’min).
The desert Arabs say, “We believe!” Say, “Do not say you believe; but only say, ‘We have submitted our wills to God (as Submitters / Muslims),’ as belief has not yet entered your hearts. But if you obey God and His Messenger, He will not deprive you anything of your deeds: for God is Oft-Forgiving, Most Merciful.” (49:14)
Therefore, becoming a Submitter (Muslim) only requires belief in one God regardless of their belief in God’s angels, messengers, and scriptures. Verse 2:285 gives us the requirements for one to be a Believer (Mu’min).
“The messenger believes in that which has been revealed to him from his Lord and (so do) believers. Each one believes in God and His angels and His scriptures and His messengers – We make no distinction between any of His messengers – and they say: We hear, and we obey. …. ” (2:285)
Therefore, better testimonies that don’t violate verses 2:136 and 2:285 are:
Testimony to be a Submitter (Muslim)
I bear witness that there is no god but God.
Testimony to be a Submitter (Muslim) and a Believer (Mu’min)
I bear witness that there is no god but God.
I bear witness to the existence of God’s angels.
I bear witness that God revealed scriptures including, but not limited to, the Torah, Injil, and the Quran.
I bear witness that Muhammad and many others before him including Abraham, Moses, and Jesus, were messengers of God.
Submitters (Muslims) existed before Muhammad’s time
Many Muslims today believe that Muhammad was the first Muslim (submitter). However, below is proof that many people were Muslims (Submitters) way before Muhammad was even born.
And recite to them the news of Noah, when he said to his people, … I have been commanded to be of the Submitters (Muslims).” (10:71-72)
Prophet Ibrahim (Abraham), Ismail (Ishmael), Is’haq (Isaac), Ya’kub (Jacob) and Ya’kub’s sons were Submitters (Muslims)
And who would be averse to the religion of Abraham? … When his Lord said to him, “Submit”, he said “I have submitted [in Islam] to the Lord of the worlds.” And Abraham instructed his sons [to do the same] and [so did] Jacob, [saying], “O my sons, indeed God has chosen for you this religion, so do not die except while you are Muslims.” Or were you witnesses when death approached Jacob, when he said to his sons, “What will you worship after me?” They said, “We will worship your God and the God of your fathers, Abraham and Ishmael and Isaac – one God. And we are Submitters (Muslims) [in submission] to Him.” (2:130 – 133)
…. I am Joseph, …… My Lord …. You are my protector in this world and in the Hereafter. Cause me to die a Submitter (Muslim) and join me with the righteous.” (12:90-101)
Prophet Sulaiman (Solomon) was a Submitter (Muslim)
But when Jesus felt [persistence in] disbelief from them, he said, “Who are my supporters for [the cause of] God?” The disciples said,” We are supporters for God. We have believed in God and testify that we are Submitters (Muslims). (3:52)
People who believed in the previous scriptures (Torah, Injil) were Submitters (Muslims)
Those to whom We gave the Scripture before it – they are believers in it. And when it is recited to them, they say, “We have believed in it; indeed, it is the truth from our Lord. Indeed we were, [even] before it, Submitters (Muslims).” (28:52-53)
God named people before Muhammad’s time Submitters (Muslims)
… [It is] the religion of your father, Abraham. God named you “Submitters” (“Muslims”) before [in former scriptures] and in this [revelation (the Quran)] that the Messenger may be a witness over you and you may be witnesses over the people. So establish prayer and give zakah and hold fast to God. He is your protector; and excellent is the protector, and excellent is the helper. (22:78)
Shema Yisrael (שְׁמַע יִשְׂרָאֵל)
The key part of testimony to be a submitter (Muslim) is “there is no god but God”. Note that this statement regarding the oneness of God is often found in the Quran and matches the Shema Yisrael. The Shema Yisrael is found in the Torah in Deuteronomy 6:4.
שְׁמַע יִשְׂרָאֵל יְהוָה אֱלֹהֵינוּ יְהוָה אֶחָֽד
Hear, O Israel: the LORD our God, the LORD is one (Deuteronomy 6:4)
According to Wikipedia, the Shema is a centerpiece of morning and evening Jewish prayers. Observant Jews consider the Shema to be the most important part of the prayer service in Judaism, and its twice-daily recitation as a mitzvah (religious commandment). It is traditional for Jews to say the Shema as their last words, and for parents to teach their children to say it before they go to sleep at night.