What is the prefered way to swear in Genesis?

Put your hand under a thigh

And Abraham said unto his eldest servant of his house, that ruled over all that he had, Put, I pray thee, thy hand under my thigh: And ... swear by the LORD. Genesis 24:2-3

And the time drew nigh that Israel must die: and he called his son Joseph, and said unto him , If now I have found grace in thy sight, put, I pray thee, thy hand under my thigh ... And he said, Swear unto me. And he sware unto him. Genesis 47:29-31