TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
user yasir
NA
5
396
I want to get some data from web with access token.
Sep 24 2018 4:04 AM
This code is not working for me,
public async Task callapi()
{
try
{
RestClient client = new RestClient("https://mytest.syncloft.com/");
client.ClearHandlers();
RestRequest request = new RestRequest("shop/sync-discounts", Method.GET);
request.RequestFormat = DataFormat.Json;
request.AddHeader("content-type", "application/json");
request.AddHeader("Authorization", "Bearer" + accessToken);
var response = await client.ExecuteTaskAsync(request);
if (response != null)
{ Console.Write(response); }
else { Console.Write("Error0"); }
} catch(Exception exc)
{ Console.Write(exc.ToString()); }
}
Reply
Answers (
1
)
To Create a timer and to print data using a new Thread
abstract class and Interface