cx icon indicating copy to clipboard operation
cx copied to clipboard

cx playground: add json api endpoint

Open SkycoinSynth opened this issue 3 years ago • 1 comments

  • end- point must take JSON (request id, integer random or string) -- end point accepts a "program"

And returns

  • echos the request id back (the string or integer is returned back to sender identically)
  • request id string cannot be longer than 256 characters or error

Request for json endpoint returns

  • returns program that was input ("program")
  • returns execution time in seconds, to 3 decimal places (to ms accuracy)
  • has error field, where an error string can be returned (empty string if success). If compiler error occurs, we will use this.
  • has "output field" which is string with program output

Document the list of APIs in readme.md

  • with example url
  • with example using wget and example output

SkycoinSynth avatar Mar 05 '21 08:03 SkycoinSynth

@SkycoinSynth

Visit the playground for the first time to determine whether there is a cookie or uuid (without regenerating a return)

How about all subsequent requests carrying cookies or uuid to confirm user identity?

Liberxue avatar Mar 10 '21 14:03 Liberxue