Prep the vegetables. Wash them well, then slice, quarter or cut into spears. You can leave green beans, asparagus. or okra whole, if you wish.
In two quart-sized mason jars, divide the garlic and whole spices.
Begin adding the veggies. If you include the onion (recommended), layer a few slices in with the veggies along with any fresh herbs you would like to include. Fill the jars, leaving about an inch at the top.
In a saucepan, bring the water, vinegar, salt, and sugar to a boil. Then pour the hot liquid into the jars, making sure to submerge all the vegetables, pressing them down with a wooden spoon. You may be able to add more veggies at this point, but be sure to cover them with liquid, leaving a half inch between the liquid and the lid.
Cover and let sit on the counter to cool for an hour or two. Place in the fridge. They will taste good after 6 to 8 hours, but much better in a couple of days.