Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2018-10

Using REST based Services

5 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Marc Santhoff

Hi,

being rather agnostic regarding web techniques I have to ask:

What module or unit is best for being used when calling web services?

I want to try using Apache Tika running as a server for extracting the contents of files. Files are transferred using HTTP PUT method-

See there for a quick overview:
https://wiki.apache.org/tika/TikaJAXRS#Services

TIA,
Marc

Marc Santhoff
Michael Van Canneyt
to Marc Santhoff
Marc Santhoff wrote 5 lines
Hi, being rather agnostic regarding web techniques I have to ask: What module or unit is best for being used when calling web services?

fphttpclient is what you need.

Show quoted text 6 lines
I want to try using Apache Tika running as a server for extracting the contents of files. Files are transferred using HTTP PUT method- See there for a quick overview: https://wiki.apache.org/tika/TikaJAXRS#Services

Rest services are not very standardized. Each service is different, and therefor the lowest common denominator is the use of the HTTP protocol. Which is exactly what is encapsulated in the fphttpclient unit.

The demo programs for fphttpclient should get you going.

Michael.

Marc Santhoff
to Michael Van Canneyt
Michael Van Canneyt wrote 10 lines
On Sat, 6 Oct 2018, Marc Santhoff wrote: > Hi, > > being rather agnostic regarding web techniques I have to ask: > > What module or unit is best for being used when calling web services? fphttpclient is what you need.

OK, fine. I have used that already.

Show quoted text 9 lines
> > I want to try using Apache Tika running as a server for extracting the > contents of files. Files are transferred using HTTP PUT method- > > See there for a quick overview: > https://wiki.apache.org/tika/TikaJAXRS#Services Rest services are not very standardized. Each service is different, and therefor the lowest common denominator is the use of the HTTP protocol.

I see. It is simple enough to put a request together like when using curl in a terminal.

Which is exactly what is encapsulated in the fphttpclient unit. The demo programs for fphttpclient should get you going.

Many thanks!
Marc

Marc Santhoff
Alexander Grotewohl
to Marc Santhoff

A bit off topic for the list but I've used a program called "Insomnia" which is a client for debugging REST APIs and it was incredibly handy. Especially so you don't try everything under the sun before, for example, realizing your API key is incorrect.

Alex

Marc Santhoff wrote 27 lines
On Sun, 2018-10-07 at 00:23 +0200, Michael Van Canneyt wrote: > On Sat, 6 Oct 2018, Marc Santhoff wrote: > >> Hi, >> >> being rather agnostic regarding web techniques I have to ask: >> >> What module or unit is best for being used when calling web services? > fphttpclient is what you need. OK, fine. I have used that already. >> I want to try using Apache Tika running as a server for extracting the >> contents of files. Files are transferred using HTTP PUT method- >> >> See there for a quick overview: >> https://wiki.apache.org/tika/TikaJAXRS#Services > Rest services are not very standardized. Each service is different, and > therefor the lowest common denominator is the use of the HTTP protocol. I see. It is simple enough to put a request together like when using curl in a terminal. > Which is exactly what is encapsulated in the fphttpclient unit. > > The demo programs for fphttpclient should get you going. Many thanks! Marc
Marc Santhoff
to Alexander Grotewohl

Hello Alex,

sounds very interesting, but in this case I'm only the user of an API. Look there:

http://tika.apache.org/

Tika will run as a service and my task is to stick files in an get the contents back. So nothing to debug regarding the API on my side.

Thank you anyway,
Marc

Alexander Grotewohl wrote 45 lines
A bit off topic for the list but I've used a program called "Insomnia" which is a client for debugging REST APIs and it was incredibly handy. Especially so you don't try everything under the sun before, for example, realizing your API key is incorrect. Alex On 10/7/2018 4:03 PM, Marc Santhoff wrote: > On Sun, 2018-10-07 at 00:23 +0200, Michael Van Canneyt wrote: > > On Sat, 6 Oct 2018, Marc Santhoff wrote: > > > > > Hi, > > > > > > being rather agnostic regarding web techniques I have to ask: > > > > > > What module or unit is best for being used when calling web services? > > > > fphttpclient is what you need. > > OK, fine. I have used that already. > > > > I want to try using Apache Tika running as a server for extracting the > > > contents of files. Files are transferred using HTTP PUT method- > > > > > > See there for a quick overview: > > > https://wiki.apache.org/tika/TikaJAXRS#Services > > > > Rest services are not very standardized. Each service is different, and > > therefor the lowest common denominator is the use of the HTTP protocol. > > I see. It is simple enough to put a request together like when using curl in a > terminal. > > > Which is exactly what is encapsulated in the fphttpclient unit. > > > > The demo programs for fphttpclient should get you going. > > Many thanks! > Marc > _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Marc Santhoff