How can I shorten the string and return the original content later?
Can you post the data? If you are using GET, the maximum url length is around 4000 characters. If you are using POST, you have no limit (other than memory timeouts, etc.)
This article talks about executing a message from objective-c
source to share
Are you sure you need to pass it as a URL? Maybe POST-Data or Session would be more appropriate? otherwise, you could store the row in the database and return the key of the inserted record as a URL parameter. If it's a security issue (since people can just change the number if it's an integer key), you can create a UUID key as a key.
source to share
You can try running it through Base64 . If the string is guaranteed to have only a subset of possible characters - for example, [a-zA-Z0-9] - it can be abbreviated further by converting them to unique ordinals and using a higher base encoding.
But it would be easier to just use POST.
source to share