user85303: curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "encryptwallet", "params": ["my pass phrase"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/

https://bitcoincore.org/en/doc/0.16.0/rpc/wallet/encryptwallet/
what's it?
looks  like username:password but why then it's called 'myusername'

user48884: The RPC interface is an authenticated interface - it requires a username and password to use it. By specifying --user with the RPC username, curl will prompt you to enter the passphrase before sending the request. myusername is just a placeholder for the RPC username that you actually use.
Note that this username and passphrase is unrelated to the wallet. The wallet does not have usernames, and the passphrase is specific to the wallet and provided in the RPC, not in HTTP headers.

85303: <pre><code>curl --user myusername --data-binary '{&quot;jsonrpc&quot;: &quot;1.0&quot;, &quot;id&quot;:&quot;curltest&quot;, &quot;method&quot;: &quot;encryptwallet&quot;, &quot;params&quot;: [&quot;my pass phrase&quot;] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/
</code></pre>
<p><a href="https://bitcoincore.org/en/doc/0.16.0/rpc/wallet/encryptwallet/" rel="nofollow noreferrer">https://bitcoincore.org/en/doc/0.16.0/rpc/wallet/encryptwallet/</a><br />
what's it?</p>
<p>looks  like username:password but why then it's called 'myusername'</p>
 48884: <p>The RPC interface is an authenticated interface - it requires a username and password to use it. By specifying <code>--user</code> with the RPC username, <code>curl</code> will prompt you to enter the passphrase before sending the request. <code>myusername</code> is just a placeholder for the RPC username that you actually use.</p>
<p>Note that this username and passphrase is unrelated to the wallet. The wallet does not have usernames, and the passphrase is specific to the wallet and provided in the RPC, not in HTTP headers.</p>
