JDownloader Community - Appwork GmbH
 

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 26.11.2020, 22:48
Anuskuss Anuskuss is offline
Vacuum Cleaner
 
Join Date: Aug 2020
Posts: 17
Default User-Agent in Event Scripter

I have an event set up where JD2 grabs some information from my website. My site generates the output based on the client so it would be pretty handy if JD2 would send an actual meaningful User-Agent instead of the default Firefox one.
Reply With Quote
  #2  
Old 27.11.2020, 11:25
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,289
Default

You can customize Headers via setHeader method. For example setHeader("User-Agent","Test")
That should work as expected
__________________
JD-Dev & Server-Admin
Reply With Quote
  #3  
Old 27.11.2020, 17:30
Anuskuss Anuskuss is offline
Vacuum Cleaner
 
Join Date: Aug 2020
Posts: 17
Default

Thanks for the tip, I must've missed that when looking for it myself.
Although I do think that my issue is still valid: It doesn't matter if I identify JD2 with a GET parameter, or custom header or whatever; JD2 should identify itself from the get-go.
This just puts the burden on the user.
Reply With Quote
  #4  
Old 27.11.2020, 17:43
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 79,289
Default

I'm sorry but that Browser instance within your scripts is the same as in plugins.
If you need special handling/identification on server side via UA/Header/Get Parameter, then it's customization.
Plugins rely on server responses to be the same as in browser, so we use a normal UA for that.
__________________
JD-Dev & Server-Admin

Last edited by Jiaz; 27.11.2020 at 17:47.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +2. The time now is 14:19.
Provided By AppWork GmbH | Privacy | Imprint
Parts of the Design are used from Kirsch designed by Andrew & Austin
Powered by vBulletin® Version 3.8.10 Beta 1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.