[UnmanagedCallersOnly(EntryPoint = "greet")]
public static int Http_get()
{
// create an HTTP Request (withuot relying on WASI), set headers as needed
var request = new HttpRequest("https://httpbin.org/headers")
{
Method = HttpMethod.GET,
};
request.Headers.Add("some-name", "some-value");
request.Headers.Add("another", "again");
var response = Pdk.SendRequest(request);
Pdk.SetOutput(response.Body);
return 0;
}
Code
Got
Want
Isolated issue and tested locally, will submit PR.