0

I created one server in ASP.net using web API and call API in Roku using a bright script. I request server using POST method Its successfully done. But Is It possible Response back in Roku.

EDITED POST:

In my Server, if username and password are right then return true otherwise false.

Following code in my Server :

if (Program.global(name, pass))
{
   Request.CreateResponse(HttpStatusCode.OK, System.Text.Encoding.UTF8.GetBytes(pass));
   return Request.CreateResponse(HttpStatusCode.OK, "UserName : " + name + " PassWord : " + pass);
}
else
{
   return Request.CreateResponse(HttpStatusCode.OK, "Invalid UserName & Password");
}

I check in Postman if username and password are "right then returned username and password in response" and "wrong then return invalid username and password as a string in response".

I refer to this POST. and also refer the roUrlEvent

In Postman I check the request URL it's required sometimes so I enter the wrong username and password its working fine But the valid username and password its directly generate the error.

Execution timeout (runtime error &h23)

Does anyone know this error?

1 Answers1

0

This is where "Task" and "roUrlTransfer" comes into picture. With the help of these you can send and receive responses. First go through the documentation of these components, nodes and interfaces and do some R&D. After that you will get to know how this works.

https://developer.roku.com/en-gb/docs/references/scenegraph/control-nodes/task.md

https://developer.roku.com/en-gb/docs/references/brightscript/components/rourltransfer.md

Also go through this link for examples--

https://rokulikeahurricane.io/everything_about_http

swaran
  • 404
  • 6
  • 14
  • Thank you for your reply. I create a request successfully. you know about specific property name or event name I use in here to response get in Roku. – Nikunj Chaklasiya Sep 04 '19 at 09:31
  • @NikunjChaklasiya I edited my answer. Please check that link for some examples. – swaran Sep 04 '19 at 10:04
  • @swarn Sorry for disturbing I try to read and understand in HTTP on Roku example. and use all method. But In response time nothing to display in ROKU. Pls, I Edit my Post Check it if your free time. – Nikunj Chaklasiya Sep 18 '19 at 06:31
  • @NikunjChaklasiya, Ok I will try to look on weekend. – swaran Sep 18 '19 at 06:39