Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
pass optional parameters as params
#6
Why can't the following code exist simultaneously?
https://i.ibb.co/9yzGyJX/AAA.gif

Code:
Copy      Help
// script "LaHttp Run _T2.cs"
/*/ c LaHttp.cs; /*/ //.
using System.Text.Json;
using System.Text.Json.Nodes;

//..

// 6

internet.http.Post("http://localhost:4455/JsonSimple", internet.jsonContent(new R1(5, "text"))); record R1(int i, string s);
//internet.http.Post("http://localhost:4455/JsonSimple", internet.jsonContent(new { i = 5, s = "text" }));

// 7
//Arrays with any number of elements can be passed using JSON. The new HTTP server code makes it easier.
//LaHttp.CallJ("TestJsonArray", new string[] { "a", "b" });

internet.http.Post("http://localhost:4455/TestJsonArray", internet.jsonContent(new string[] { "a", "b" }));


Messages In This Thread
pass optional parameters as params - by Davider - 05-05-2024, 09:47 PM
RE: pass optional parameters as params - by Davider - 05-06-2024, 10:40 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)