Home of the Squeezebox™ & Transporter® network music players.
Page 4 of 4 FirstFirst ... 234
Results 31 to 32 of 32
  1. #31
    Senior Member
    Join Date
    Feb 2013
    Posts
    176
    Quote Originally Posted by bpa View Post
    Need to be clearer.
    What is the part of the message that is standard - doesn't change
    What is the variable part of the message which will provided by parameters of save a menu (i.e.f desatination address, port number, other parameters)
    What is the HTTP operation e.g. GET, POST
    Is there a reply always a reply ? How should reply be handled e.g. status codes 2xx vs 4xx vs 5xx
    I do believe we are talking about a GET operation in HTTP.

    I don't think there's actually any payload. We can type this in the address bar of the web browser - type in the address and get the answer.
    It can be made to not answer, but I do not beleive one should program it that way, not that the answer is very useful.

    if a bad address is entered you get this:
    "Cannot GET /endpoint/badlywrittenname"

    The address/port and /endpoint/ are to be standardized (endpoint isn't something I can change and comes with node-red)

    the only part that changes is the trigger name.

    192.168.0.xx:1880/endpoint/triggername
    Last edited by Marsupial; 2020-12-31 at 16:02.

  2. #32
    Senior Member
    Join Date
    Feb 2013
    Posts
    176
    It seems the possible reply (if any) can easily be 200, 400 - it is set numerically but right now I always reply 200 if the address exists.

    I guess one could build a more complex system, asking for data or something. but to trigger things in the system just 200 seems good.

    BTW have a good end of 2020 and a happy 2021.
    Last edited by Marsupial; 2021-01-01 at 07:39.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •