Added basic locking (but no unlocking) for sending posts. Added a new function to get the URL to send