Hi everybody,
When I tried to do something similar to this code
var uri = "https://<mypage>.com/"
var sendRequest = function() {
var options = {
method: 'POST',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: JSON.stringify(params)
};
fetch(uri, options).then(function(response) {
var data = JSON.stringify(response)
debug_log(data);
}, function(error) {
debug_log(error);
});
};
I got this exception
Fetch error System.UriFormatException: Invalid URI: The format of the URI could not be determined.
at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind)
at System.Uri..ctor(String uriString)
at System.Net.WebRequest.Create(String requestUriString)
at MyHttpLib.HttpRequest..ctor(String url)
at Uno.Net.Http.Implementation.CilHttpRequest..ctor(IHttpMessageHandlerRequestCallbacks requestCallbacks, String method, String url)
at Uno.Net.Http.Implementation.CilHttpRequest.Create(IHttpMessageHandlerRequestCallbacks requestCallbacks, String method, String url)
at Uno.Net.Http.HttpMessageHandlerRequest..ctor(HttpMessageHandler handler, String method, String url, IDispatcher dispatcher) in C:\ProgramData\Uno\Packages\Uno.Net.Http\0.26.9\$.uno#2:line 247
here is an example of the body
{“location”:“somewhere”,“date”:“14\nTHU\nAPR”,“time_slot”:“10 AM- 11 AM”,“check”:“true”}