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

php - Embed BBCode within itself not working -

neo4j - finding mutual friends in a cypher statement starting with three or more persons -

linux - Why does bash short curcuit fail in crontab? -