|
Good afternoon,
I'm having trouble calling the post method using REST calls with a webservice.
I would like to send an atom entry document containing my new information to a webservice using APIs.
I already have the URI, and have gotten as far as:
HttpWebRequest new_request = (HttpWebRequest)WebRequest.Create(sec_req); new_request.Credentials = new NetworkCredential(username,password); new_request.Method = "POST"; new_request.ContentType = "application/atom+xml";
I would now like to send an atom entry element which requires:
<title type="text"> // I am going to have a title ex: "EXAMPLE TITLE" <link href="link_url"/> // I will provide a url such as example.com <content type="html"> // keep this as "html"
I think I am supposed to use string builder and send this as a header or something along those lines but I am not quite sure how it works, and what syntax to use. (I am creating a new bookmark using an API). Correct me if i'm wrong, when I send the header(in a string) to the service, if it goes through, then my bookmark will be created?
PLEASE HELP!!! THANKS IN ADVANCE!!!
|