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
Maharudra Gadekar
1.4k
367
82.1k
how to pass some parameter in header and some in query strin in webapi
Mar 18 2021 10:37 AM
Hi,
i am using webapi and I am stuck in how to pass parameter in header and querystring single time.
Can you help me please .
Look at below code.
HttpClient client = new HttpClient();
client.DefaultRequestHeaders.Add("para1", "para1");
client.DefaultRequestHeaders.Add("para2", "para2");
client.DefaultRequestHeaders.Add("para2", "para2");
HttpResponseMessage response1 = client.GetAsync("https://test.com/api/
[email protected]
").Result;
if (response1.IsSuccessStatusCode)
{
var result = response1.Content.ReadAsStringAsync().Result;
}
else
{
//Something has gone wrong, handle it here
}
Please help me
Thanks in advance.
Reply
Answers (
3
)
print a Div without print preview
To Provide index as AA,AB,AC......So on for the list of records in PDF