I try to do some get request, as I am only interested in the status code and the mime type, due to security and traffic I dont want to get the body. Is there any way to do this? I tried the Get request node, as well as the Http retriever and Http result data extractor from palladian. Neither of them seem to work. Any ideads/suggestions?
You can do this with a HEAD request (must be supported by the server) and the Http Retriever from Palladian. Here’s an example workflow on my NodePit Space:
Thank you so much Philipp, this was exactly what I was looking for!
I didn’t find it, would be nice to be able to configure it without a flow variable or table column tho, in my opinion (I guess it would have also helped, if I would have known I am looking for a HEAD request) .
Still thank you so much for your fast response with an example workflow and your great node package!
This is at the end entirely server-dependent, unfortunately. But a 405 (which means “Method not allowed”) would be a strong indicator, that HEAD requests are indeed not permitted.
There’s probably another dirty workaround (if your main goal is to save traffic): You can do a normal GET and then use the Http Retriever’s “File Size Limitation” and configure a value of e.g. “1 kb”. This will not entirely prevent the download (in fact, the first 1024 bytes are still transferred), but you can save some bandwidth as each request will be stopped after 1 kb. (see updated example workflow linked above):
Indeed. This is kind of a bug and we should fix that. I think the issue is, that the first check occurs after the download buffer has been filled the first time.