Added some code for https requests