How to initialize web3 provider

I have a question about https provider and wss provider.
How can I determine which provider will use between https and wss?
What is difference between https and wss provider?

In my projects, I used:

const web3js = new web3(config.httpsProvider);

Any difference from the following?

const web3js = new web3(new web3.providers.WebsocketProvider(config.wssProvider));

Hi @oleg-norestlabs welcome to the community!

The config.httpsProvider and config.wssProvider indicate that you are setting both of those in the config object/file. If you see the example here,

You can see that instead of config.wssProvider you can specific the actual URL or local address for your provider. The https and wss providers are user controlled and defined.

Thanks for your answer.
I know the config and how to use web3 apis.
My question is the difference between the usage of https provider and wss provider.
Both are the same usecase?
Any other purpose?

const web3js1 = new web3(config.httpsProvider);
const web3js2 = new web3(new web3.providers.WebsocketProvider(config.wssProvider));

web3js1 is the same as web3js2?
Any difference?

Unfortunately this is a better question for the web3.js team, they have a gitter here,