How to post data in a url

The short answer is you can’t. POST request is created for hiding its body. And it’s hard to understand how will you use it, since code is invalid. I’m pretty sure you need something different than using url parameters in post request. Explain what do you need to achieve in a bigger scale.

If you build your url inside your app, you don’t need to interpolate username and pass to it, transfer them separately.