in Education by
I am a very novice C# person so please dont be too hard on me Im trying to make a post request to MSFLOW from a MSBOT Framwork chatbot. The post request triggers the flow to send an email to chatbot users manager. I just dont know where to start. I have a basic BOT template from Az but how and where should I put the request Many thanks JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
use HttpWebRequest here is an example of using Http POST request . using System; using System.IO; using System.Net; using System.Text; namespace Examples.System.Net { public class WebRequestPostExample { public static void Main() { // Create a request using a URL that can receive a post. WebRequest request = WebRequest.Create("http://www.example.com/post"); // Set the Method property of the request to POST. request.Method = "POST"; // Create POST data and convert it to a byte array. string postData = "This is a test that posts this string to a Web server."; byte[] byteArray = Encoding.UTF8.GetBytes(postData); // Set the ContentType property of the WebRequest. request.ContentType = "application/x-www-form-urlencoded"; // Set the ContentLength property of the WebRequest. request.ContentLength = byteArray.Length; // Get the request stream. Stream dataStream = request.GetRequestStream(); // Write the data to the request stream. dataStream.Write(byteArray, 0, byteArray.Length); // Close the Stream object. dataStream.Close(); // Get the response. WebResponse response = request.GetResponse(); // Display the status. Console.WriteLine(((HttpWebResponse)response).StatusDescription); // Get the stream containing content returned by the server. dataStream = response.GetResponseStream(); // Open the stream using a StreamReader for easy access. StreamReader reader = new StreamReader(dataStream); // Read the content. string responseFromServer = reader.ReadToEnd(); // Display the content. Console.WriteLine(responseFromServer); // Clean up the streams. reader.Close(); dataStream.Close(); response.Close(); } } }

Related questions

0 votes
    @RequestMapping annotation is used to map a HTTP request method (GET or POST) to a specific class or method in the ... which will handle the respective request. A. True B. False...
asked Nov 8, 2022 in Education by JackTerrance
0 votes
    Is it possible to make a timeout of 3 seconds in a post request ? How ? My code for the moment ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 22, 2022 in Education by JackTerrance
0 votes
    Howdy, I have a DataRow pulled out of a DataTable from a DataSet. I am accessing a column that is ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 23, 2022 in Education by JackTerrance
0 votes
    How can you strip non-ASCII characters from a string? (in C#) JavaScript questions and answers, JavaScript ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 19, 2022 in Education by JackTerrance
0 votes
    Has anyone worked on calling a C# module from C module. I tried searching on internet but didn't ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 24, 2022 in Education by JackTerrance
0 votes
    I have a legacy code implemented in C (not C++). I would like to be able to call a few ... , JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 24, 2022 in Education by JackTerrance
0 votes
    i m developing a little tool on my Pocket PC using WM6 SDK but i would like to implement a finger ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 12, 2022 in Education by JackTerrance
0 votes
    I am using .net framework 4.0 and working on Web deployment Setup, I have referenced the SMO Assemblies ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 13, 2022 in Education by JackTerrance
0 votes
    I have two tables. Orders OrderID | UserID | OrderTotal 1 | 1 | 100 2 | 2 | 110 3 | 1 ... questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 13, 2022 in Education by JackTerrance
0 votes
    I'm trying to identify what the bot framework maps events to ActivityTypes. I can't find anything in ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 14, 2022 in Education by JackTerrance
0 votes
    I am working on my first Android Application. What I am trying to do is a POST request to a REST ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 13, 2022 in Education by JackTerrance
0 votes
    I want create expression with reflection in c#. I am target script is: using (var service = new ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 14, 2022 in Education by JackTerrance
0 votes
    Hi Folks i was googling one more hours.i did not find anything relevant, I have text File like ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 14, 2022 in Education by JackTerrance
0 votes
    I built an OCR application which reads PDF files and OCR's them. I built it using Multi-threading ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 17, 2022 in Education by JackTerrance
0 votes
    Designing a registration form, and I get this error when adding in MessageBoxButtons and MessageBoxIcon. The error ... for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 15, 2022 in Education by JackTerrance
...