Skip to content

Commit

Permalink
Comment out debug logging
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelJustin committed Jan 6, 2024
1 parent 98c990c commit 7547a89
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions demo/tutorial12/AuthResponseResource.pas
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ implementation
procedure TAuthResponseResource.OnPost(Request: TdjRequest; Response: TdjResponse);
var
AccessToken: string;
P: string;
// P: string;
begin
if Request.Params.Values['state'] <> Request.Session.Content.Values['state'] then
begin
Expand All @@ -63,10 +63,10 @@ procedure TAuthResponseResource.OnPost(Request: TdjRequest; Response: TdjRespons
Exit;
end;

for P in Request.Params do
begin
WriteLn(P);
end;
// for P in Request.Params do
// begin
// WriteLn(P);
// end;

// Read the access_token
AccessToken := Request.Params.Values['access_token'];
Expand Down
4 changes: 2 additions & 2 deletions demo/tutorial12/RootResource.pas
Original file line number Diff line number Diff line change
Expand Up @@ -131,15 +131,15 @@ function TRootResource.SendMail(const AccessToken: string): string;
RequestBody: TStream;
ResponseBody: string;
begin
WriteLn(JSON);
// WriteLn(JSON);

HTTP := CreateIdHTTPwithSSL12(AccessToken);
try
try
HTTP.Request.ContentType := 'application/json';
RequestBody := TStringStream.Create(JSON, TEncoding.UTF8);
ResponseBody := HTTP.Post('https://graph.microsoft.com/v1.0/me/sendMail', RequestBody);
WriteLn('Response: "' + ResponseBody + '"');
// WriteLn('Response: "' + ResponseBody + '"');
except
on E: EIdHTTPProtocolException do
begin
Expand Down

0 comments on commit 7547a89

Please sign in to comment.