Meeting with little success in London, he retired to Marlborough, whence he afterwards removed to Bristol, where as a local counsel he gained a great reputation.
When Alexander Broadfoot was indicted for the murder of Cornelius Calahan, a sailor in the king's service, who boarded the merchantman to which Broadfoot belonged, and was killed in an attempt to press the prisoner for the Navy, Foster delivered an elaborate judgment in support of the legality of impressment, being convinced that "the right of impressing mariners for the publick service is a prerogative inherent in the crown, grounded upon common law, and recognised by many acts of parliament".
Upon the recommendation of Lord Chancellor Hardwicke, Foster was appointed a puisne judge of the King's Bench in succession to Sir William Chapple (c.1676-1745) of Upwey.
During the eighteen years he sat in the king's bench he maintained a high character for his learning as well as for his integrity and independence of judgment.
Many years later, Lord Chief Justice De Grey declared that Foster might "be truly called the Magna Charta of liberty of persons as well as fortunes", while Sir William Blackstone pronounced him to be a very great master of the crown law.