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
Arya raj
NA
57
34.8k
how to write http client api to endpints in web.config
Aug 5 2019 12:16 AM
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace C3ANS_WebAPI.Controllers
{
public class AttributeController : ApiController
{
// saving attributes
[Route("api/DRS/v1/Attributes")]
[HttpPost]
public async Task<HttpResponseMessage> PostAttribute()
{
try
{
using (HttpClient client = new HttpClient())
{
client.DefaultRequestHeaders.Accept.Clear();
HttpResponseMessage response = await client.PostAsync("http://localhost:8089/api/DRS/v1/Attributes", Request.Content);
AttributeController.cs, Line 21, 1 comment
Reply
Answers (
1
)
how to fetch the data from SQL
how to subtract 30 days in date