create a HTTP request and fetch the data as JSON