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

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -