HTTP response code

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

HTTP response code

Post by kim »

How can I get the HTTP response code ?

Code: Select all

OMDb.request()
(other then from the log file)

because for every round the timeout is 20 sec or so...

Code: Select all

Caused by: java.io.IOException: Server returned HTTP response code: 522 for URL
If error I want to stop trying after the first round (3 times I think) of "Fetch failed"
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: HTTP response code

Post by rednoah »

Sorry, you'll have to make your own HTTP requests if you want check response codes and do your own retry behaviour.


You can configure the internal retry count and retry time via system properties though.
:idea: Please read the FAQ and How to Request Help.
kim
Power User
Posts: 1251
Joined: 15 May 2014, 16:17

Re: HTTP response code

Post by kim »

ok
We (I) need a complete list possible system properties
Developer Options / Java System Properties

Do Filebot only work with the "new" format ?

Code: Select all

filebot -script fn:properties --def ...
I see you can add anything, how can you access it ?
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: HTTP response code

Post by rednoah »

Here are the default values for the system properties related to web request retry behaviour:

Code: Select all

net.filebot.CachedResource.retryLimit=2
net.filebot.CachedResource.retryDelay=PT2S
net.filebot.CachedResource.retryMultiplier=4

You can use the -D java option if you don't want to use the ~/.filebot/system.properties file:

Code: Select all

export JAVA_OPTS="-Dnet.filebot.CachedResource.retryLimit=0"
filebot -script fn:sysenv
:idea: Please read the FAQ and How to Request Help.
Post Reply