fixed HttpCreateRequest() function