Questions tagged [idhttp]

This is the Indy component for HTTP requests.

TIdHTTP is a component of the Internet Direct (aka "Indy") open source library for performing HTTP requests. The component can handle redirects, authentication, and data retrieval all by itself.

IO Handlers can be attached for SSL, streaming, or custom designed IO.

268 questions
2
votes
1 answer

Delphi TIdHTTP POST does not encode plus sign

I have a TIdHTTP component on a form, and I am sending an http POST request to a cloud-based server. Everything works brilliantly, except for 1 field: a text string with a plus sign, e.g. 'hello world+dog', is getting saved as 'hello world…
Alex
  • 543
  • 1
  • 9
  • 21
2
votes
2 answers

Find out the type of file ( GIF, JPG, PNG) - DELPHI

I'm carrying images per URL and showing TImage . I will work with JPG , GIF and PNG . But I do not know how to find out what kind of extension possess each file, and then differentiate. How do I get header , or any other method for me to know what…
abcd
  • 441
  • 6
  • 24
2
votes
0 answers

Delphi idHTTP upload file

I try to upload file to sharepoint 2013 using standart form. I use TIdHTTP, TIdSSLIOHandlerSocketOpenSSL and TIdLogDebug components: procedure TForm1.Button3Click(Sender: TObject); var DS: TIdMultipartFormDataStream; begin DS :=…
vlad_n
  • 123
  • 2
  • 7
2
votes
1 answer

idHttp Get + Delphi + The requested URL was rejected

I'm trying to run this code: var objHttp: TIdHTTP; ... objHttp.HandleRedirects := True; objHttp.AllowCookies := True; sGet := objHttp.Get('http://www.bmf.com.br/arquivos1/arquivos_ipn.asp?idioma=pt-BR&status=ativo'); ... and I'm getting…
GPGomes
  • 147
  • 3
  • 14
2
votes
1 answer

Delphi: Use TidHTTPServer for transfer file and monitoring byte send for single request

Using TIdHTTPServer (Indy 10.6), how do track how many bytes are sent to the client (user browser) for each request (on close connection)? procedure onCommandGet(AContext: TIdContext; ARequestInfo: TIdHTTPRequestInfo; AResponseInfo:…
Simone Nigro
  • 4,717
  • 2
  • 37
  • 72
2
votes
1 answer

Socket Error #113 No route to host on Android

In a Delphi XE6 FireMonkey app, when I press the button, I get the following error on Android: Socket Error #113 No route to host procedure TForm1.Button1Click(Sender: TObject); var Intent: JIntent; datosPost: TIdMultiPartFormDataStream; …
Lluis Bernabeu
  • 83
  • 3
  • 11
2
votes
2 answers

Delphi - Indy TIdHttp.Get with large URL length

I'm trying to use the GET method from Indy 10 however, my URL's length is bigger than 255 chars. And GET method only accepts "string" parameters. body := httpCom.Get('..........wide string.........') Delphi's compiler give me the error: "String…
2
votes
0 answers

Slow responses to TIdHTTP POSTs

I am investigating a problem with a legacy executable, written in Delphi 5, utilising Indy 9. Components in use: TIdHTTP, TIdConnectionIntercept & TIdSSLIOHandlerSocket. The problem the app is presently experiencing is slow responses to TIdHTTP…
CoastalB
  • 695
  • 4
  • 15
2
votes
2 answers

Programmatically downloading a file from a filehoster

I have some files uploaded at a filehoster which I want to download programmatically, using Delphi. They don't require any captchas or the like, normally you simply press a button and you get the file. Let's take this as an example. Now I thought I…
DNR
  • 1,619
  • 2
  • 14
  • 22
1
vote
3 answers

Delphi: download a file with URL Forwarding

I have a free domain name with URL Forwarding (Cloaking) to another site. If I type http://my.com/1.zip in browser's web-address then it goes to http://his.com/1.zip and downloads a file. How can I do the same with Indy TIdHTTP (Delphi XE2).…
maxfax
  • 4,281
  • 12
  • 74
  • 120
1
vote
2 answers

POST with TIdHTTP hangs on retrieving the JSON response

This question is maybe more a tip for people to search a solution if they have the same problem (as I found the solution eventually). I had an application that does some HTTP requests with a local server (a mix of GET/POST with JSON content in the…
DDeberla
  • 77
  • 5
1
vote
1 answer

Use Greek letters in URL in GET request

I'm developing an Android app in Delphi 10.4. My client communicates with the server through web services. I use a search-by-name service with the GET method to take a list of names depending on what letter, English or Greek, I type in a TEdit. The…
Antonis
  • 55
  • 5
1
vote
0 answers

Connection error with TIdHTTP in Delphi application. How to solve it?

I have a software which is working faultlessly for 2 years now. This software connects to our remote server every 5 days to check for version updates as well as users license status. But from yesterday it has suddenly started giving an error when…
Yogi Yang 007
  • 5,147
  • 10
  • 56
  • 77
1
vote
1 answer

"Out of memory while expanding memory stream" error when attempting to download a file using TIdHTTP

I am attempting to download a file from a web server using the standard TIdHTTP and TIdSSLIOHandler components in Delphi 10.4: memorystream := TMemoryStream.Create; http.request.useragent:='Mozilla/5.0 (Windows NT 5.1; rv:2.0b8) Gecko/20100101…
Some1Else
  • 715
  • 11
  • 26
1
vote
0 answers

Capture post json body in delphi IdHTTPServer

I have a IdHTTPServer in delphi indy and I want to recieve a json that is send in the body. I have this: procedure Treportserver.IdHTTPServer1CommandGet(AContext: TIdContext; ARequestInfo: TIdHTTPRequestInfo; AResponseInfo:…