I use site editor for Azure Function. I modified initial function code, so it is now:
#r "Newtonsoft.Json" using System.Net; using Microsoft.AspNet