Session setProxy not working with http

I am using webContents.session.setProxy and it works with socks. but with http/https it is not working.

I am using this code:
session.setProxy({proxyRules:socks5://xxx.xxx.xxx.xxx:xxxx}, function() {}) works

session.setProxy({proxyRules:http://xxx.xxx.xxx.xxx:xxxx}, function() {}) Not working

Any reason or the syntax for http is wrong?