Advertisement
Guest User

Untitled

a guest
Feb 9th, 2019
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. unit Unit1;
  2.  
  3. interface
  4.  
  5. uses
  6. Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants,
  7. System.Classes, Vcl.Graphics,
  8. Vcl.Controls, Vcl.Forms, Vcl.Dialogs, IdBaseComponent, IdComponent,
  9. IdTCPConnection, IdTCPClient, IdHTTP, Vcl.StdCtrls;
  10.  
  11. type
  12. TForm1 = class(TForm)
  13. Memo1: TMemo;
  14. IdHTTP1: TIdHTTP;
  15. procedure FormCreate(Sender: TObject);
  16. private
  17. { Private declarations }
  18. public
  19. { Public declarations }
  20. end;
  21.  
  22. var
  23. Form1: TForm1;
  24.  
  25. implementation
  26.  
  27. {$R *.dfm}
  28.  
  29. procedure TForm1.FormCreate(Sender: TObject);
  30. var
  31. cmd : string;
  32. begin
  33. IdHTTP1.Request.CustomHeaders.Clear;
  34. IdHTTP1.Request.CustomHeaders.AddValue('Accept', 'application/vnd.twitchtv.v5+json');
  35. IdHTTP1.Request.CustomHeaders.AddValue('Client-ID', 'gs7pui3law5lsi69yzi9qzyaqvlcsy');
  36. cmd := 'https://api.twitch.tv/kraken/videos/370746236';
  37. Memo1.Lines.Text := IdHTTP1.Get(cmd);
  38. end;
  39.  
  40. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement