(03-04-2020, 07:56 PM)rlebeau Wrote:(03-04-2020, 04:39 AM)happyzj Wrote: With Indy 10.6.1.518, I find idHTTP client doesn't have property "HTTPMethod" anymore and I tried following two property which doesn't work:
myhttp.Request.Method := 'SUBSCRIBE';
myhttp.Request.MethodOverride := 'SUBSCRIBE';
In order to specify a custom method, you will have to call TIdHTTP.DoRequest() directly. However, it is a protected method, so you will have to use an accessor class to reach it, eg:
Code:type
TIdHTTPAccess = class(TIdHTTP)
end;
TIdHTTPAccess(form1.myhttp).DoRequest('SUBSCRIBE', URL, nil, nil, []);
Thank you very much Rlebeau, in this case, would the custom header set in form1.myhttp - "myhttp.Request.CustomHeaders.Add(header)"would still take effect? thank you.