Fixed issues related to http client v2.5

@adamedx  @NimishaS  @kaustubh-d 

I've fixed issues related to new httpclient(v2.5). 
Also tested and it works fine on both httpclient v2.4 and v.25 .