예제 #1
0
 static void TestGet()
 {
     rest = new RestScaffolder("https://0tmgxdej5k.execute-api.us-east-1.amazonaws.com/beta/foo", RestScaffolder.Method.GET);
     rest.AddHeader("Authorization", "");
     rest.AddHeader("X-Amz-Date", "");
     //string result = rest.ExecuteGet().Result;
     //Console.WriteLine(result);
 }
예제 #2
0
        static void Main()
        {
            Console.WriteLine(DateTime.Now.ToString("yyyyMMDD'T'HHmmss'Z'"));
            rest = new RestScaffolder("https://httpbin.org/get", RestScaffolder.Method.GET);
            rest.AsynchronousGet();

            String retVal = "";

            //TestGet();
            //rest = new RestScaffolder("http://www.google.com", RestScaffolder.Method.GET);
            //Console.WriteLine("The URL is: " + rest.URL);
        }
예제 #3
0
        static void Main()
        {
            RestScaffolder rest = new RestScaffolder("https://postman-echo.com/get?foo1=bar1&foo2=bar2", RestScaffolder.Method.GET);

            rest.Execute();
        }
예제 #4
0
 static void TestStringPost()
 {
     rest      = new RestScaffolder("http://httpbin.org/post", RestScaffolder.Method.POST);
     rest.Body = "{'cat' : 'toffee'}";
     //rest.ExecuteStringPost();
 }