Discussion:
[fpc-pascal] Using REST based Services
Marc Santhoff
2018-10-06 17:30:47 UTC
Permalink
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 <***@web.de>
_______________________________________________
fpc-pascal maillist - fpc-***@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pasc
Michael Van Canneyt
2018-10-06 22:23:38 UTC
Permalink
Post by Marc Santhoff
Hi,
What module or unit is best for being used when calling web services?
fphttpclient is what you need.
Post by Marc Santhoff
I want to try using Apache Tika running as a server for extracting the
contents of files. Files are transferred using HTTP PUT method-
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.
_______________________________________________
fpc-pascal maillist - fpc-***@lists.freepascal.org
http://lists.freepascal.
Marc Santhoff
2018-10-07 20:03:49 UTC
Permalink
Post by Michael Van Canneyt
Post by Marc Santhoff
Hi,
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.
Post by Michael Van Canneyt
Post by Marc Santhoff
I want to try using Apache Tika running as a server for extracting the
contents of files. Files are transferred using HTTP PUT method-
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.
Post by Michael Van Canneyt
Which is exactly what is encapsulated in the fphttpclient unit.
The demo programs for fphttpclient should get you going.
Many thanks!
Marc
--
Marc Santhoff <***@web.de>
_______________________________________________
fpc-pascal maillist - fpc-***@lists.freepascal.org
http://lists.freepascal.
Alexander Grotewohl
2018-10-08 06:04:32 UTC
Permalink
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
Post by Marc Santhoff
Post by Michael Van Canneyt
Post by Marc Santhoff
Hi,
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.
Post by Michael Van Canneyt
Post by Marc Santhoff
I want to try using Apache Tika running as a server for extracting the
contents of files. Files are transferred using HTTP PUT method-
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.
Post by Michael Van Canneyt
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 - fpc-***@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/ma
Marc Santhoff
2018-10-08 12:17:33 UTC
Permalink
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
Post by Alexander Grotewohl
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
Post by Marc Santhoff
Post by Michael Van Canneyt
Post by Marc Santhoff
Hi,
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.
Post by Michael Van Canneyt
Post by Marc Santhoff
I want to try using Apache Tika running as a server for extracting the
contents of files. Files are transferred using HTTP PUT method-
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.
Post by Michael Van Canneyt
Which is exactly what is encapsulated in the fphttpclient unit.
The demo programs for fphttpclient should get you going.
Many thanks!
Marc
_______________________________________________
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
--
Marc Santhoff <***@web.de>
_______________________________________________
fpc-pascal maillist - fpc-***@lists.freepascal.org
http://lists.freepascal.o
Loading...