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
unathi guma
NA
40
9.8k
HTTPClient only returns HEADERS when I post my JSon payload
Apr 2 2019 3:39 AM
My code returns headers when I post to the API, please assist
public
static
async Task<
object
> PostCallAPI(
string
url, HttpContent content)
{
using
(HttpClient client =
new
HttpClient())
{
content =
new
StringContent(url, Encoding.UTF8,
"application/json"
);
HttpResponseMessage response = await client.PostAsync(url, content);
response.EnsureSuccessStatusCode();;
if
(response.StatusCode==HttpStatusCode.OK)
{
Console.WriteLine(response);
}
return
response.Content;
}
}
Reply
Answers (
3
)
Request for Code Review: Implementing ASP.Net HostedService
Hosting an ASP.NET WEBSITE with database