Added optional trailing slash to final uri