Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- unit Unit1;
- interface
- uses
- Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants,
- System.Classes, Vcl.Graphics,
- Vcl.Controls, Vcl.Forms, Vcl.Dialogs, IdBaseComponent, IdComponent,
- IdTCPConnection, IdTCPClient, IdHTTP, Vcl.StdCtrls;
- type
- TForm1 = class(TForm)
- Memo1: TMemo;
- IdHTTP1: TIdHTTP;
- procedure FormCreate(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
- var
- Form1: TForm1;
- implementation
- {$R *.dfm}
- procedure TForm1.FormCreate(Sender: TObject);
- var
- cmd : string;
- begin
- IdHTTP1.Request.CustomHeaders.Clear;
- IdHTTP1.Request.CustomHeaders.AddValue('Accept', 'application/vnd.twitchtv.v5+json');
- IdHTTP1.Request.CustomHeaders.AddValue('Client-ID', 'gs7pui3law5lsi69yzi9qzyaqvlcsy');
- cmd := 'https://api.twitch.tv/kraken/videos/370746236';
- Memo1.Lines.Text := IdHTTP1.Get(cmd);
- end;
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement