Jump to content

TomEd

Members
  • Content Count

    5
  • Joined

  • Last visited

Community Reputation

0 Neutral

About TomEd

  • Birthday 03/16/1950

Technical Information

  • Delphi-Version
    Delphi Community Edition
  1. Thanks; entered a support request this AM.
  2. Just finished installing this app on my laptop. License key (serial #) supplied via email was used to successfully install. But now every time I start the app I have to re-enter the serial number. The license manager under Help shows that all is OK. Any ideas?
  3. I've prototyped a small app using the Delphi REST components. function TForm1.QueryAPI(Resource: string): string; begin RESTRequest1.Resource := Resource; RESTRequest1.Execute; Result := RESTResponse1.JSONValue.GetValue<string>('authorization'); end; procedure TForm1.Button1Click(Sender: TObject); var jValue:TJSONValue; AuthCode, AccessToken: string; begin RestRequest1.AddBody('{"email":"<email>","password":"<password>"}', ctNone); AuthCode := QueryAPI('oauth/authorize'); MemoContent.Lines.Add('auth = ' + AuthCode); end; <email> and <password> are obfuscated intentionally. This all works fine when I omit the RestRequest1.AddBody and use the RestRequest1.Params property as Name = body (followed by 32 hex digits), Value = "email":"<email>","password":"<password>", and Kind = pkRequestBody in the IDE as provided by the REST Debugger. I don't know the significance of the 32 hex digits following "body" in the Name field since it came over from the debugger. Is this the proper way to add the body to RestRequest1 and what might be the significance of the hex digits following "body" (see attached; please excuse my clumsy editing)?
  4. TomEd

    CURL to REST Debugger

    Braces & comma did it. Thanks...
  5. I'm trying to translate the following CURL command to the REST debugger: curl -X POST "https://api.sensorpush.com/api/v1/oauth/authorize" -H "accept: application/json" -H "Content-Type: application/json" -d @- <<BODY { "email": "<email>", "password": "<password>" } BODY The PDF attached shows the result. I expect the REST omission of -H "accept: application/json" is the problem but I'm not sure where to include it in the REST debugger, but there may be other issues. Appreciate any insights... REST_Debug.pdf
×