Added code for JSON HTTP request