xamarin.forms - Error with request headers add -


i working on xamarin forms app , want data webapi. when type request.headers.add got squiggy line on add message "webheadercollection not contain definition add accepting first argument of type webheadercollection found. missing using directive or assembly reference"

        httpwebrequest request = (httpwebrequest)webrequest.create(string.format(constants.lndefaultarticles, category));                     request.method = "get";                     request.accept = "application/json";                     request.headers.add("authorization", string.format("bearer {0}", accesstoken));   

how can resolve this?


Comments

Popular posts from this blog

javascript - WinJS appendTextAsync producing scheduler errors -

minify - Minimizing css files -

Sockets with kotlin -