-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHttpModule.cpp
22 lines (20 loc) · 931 Bytes
/
HttpModule.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
//---------------------------------------------------------------------------
#pragma hdrstop
#include "HttpModule.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma classgroup "FMX.Controls.TControl"
#pragma resource "*.dfm"
TDataModule1 *DataModule1;
//---------------------------------------------------------------------------
__fastcall TDataModule1::TDataModule1(TComponent* Owner)
: TDataModule(Owner)
, IdHTTP1(new TIdHTTP(this))
{
IdHTTP1->HTTPOptions = TIdHTTPOptions() << TIdHTTPOption::hoForceEncodeParams;
IdHTTP1->HandleRedirects = true;
IdHTTP1->IOHandler = IdSSLIOHandlerSocketOpenSSL1;
IdHTTP1->Request->UserAgent =
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36";
}
//---------------------------------------------------------------------------