TTMSLCLCloudBase What Agent for macOS Cocoa |
Post Reply ![]() |
Author | ||
Black Kevin ![]() Member ![]() Joined: 23 Dec 2013 Posts: 86 |
![]() ![]() ![]() ![]() Posted: 25 Feb 2019 at 2:02am |
|
This question would equally apply to the TMS FMX Cloud Pack.
There is a property of the TTMSLCLCloudBase object that is Agent which describes the Browser properties to be used. In the past with Windows I have used this regardless: {$IFDEF MSWINDOWS} CloudBase.Agent := 'Mozilla/5.001 (windows; U; NT4.0; en-US; rv:1.0) Gecko/25250101'; {$ENDIF MSWINDOWS} I have no idea what to use with DARWIN/MACOS. For example, I could use one of the hundreds of Safari agents, but which one. An example is below: {$IFDEF DARWIN} CloudBase.Agent := 'Safari/13605.1.33.1.4 CFNetwork/897.15 Darwin/17.5.0 (x86_64)'; {$ENDIF DARWIN} These all seem to be Safari Version and OS Version specific so I'm not keen just picking one since I cannot guarantee the version of macOS or the version of Safari that users of the software might have installed.
Kevin |
||
![]() |
||
Black Kevin ![]() Member ![]() Joined: 23 Dec 2013 Posts: 86 |
![]() ![]() ![]() ![]() |
|
I've found this in an earlier post:
So I cannot find Window.Navigator. Gotta say, comments like 'add the web unit' are petty useless, why not just put the EXACT reference in the code, at least then I'd know what to look for:
My point is, this is 'probably' the solution I'm looking for, but where is the 'web' unit. I have already added fpweb (the supposed web unit) to no avail and there is no unit called 'web'. Can someone please advise the 'actual' name of the web unit to put in the uses clause? Kevin |
||
![]() |
||
Bruno Fierens ![]() TMS Support ![]() Joined: 11 May 2010 Posts: 8341 |
![]() ![]() ![]() ![]() |
|
I see your post in the LCL cloud pack forum refers to a post from us that was made in relationship to TMS WEB Core. What applies to TMS WEB Core, i.e. window.navigator.userAgent does not apply to LCL Cloud Pack.
With respect to the agent, this should for most REST services not be relevant and you can specify your own agent name. The agent is what the REST service will see and think the requests are coming from and typically a REST server does not pay attention to this. |
||
![]() |
||
Black Kevin ![]() Member ![]() Joined: 23 Dec 2013 Posts: 86 |
![]() ![]() ![]() ![]() |
|
@Bruno,
OK, that makes it easy, I was just going off your example code for the cloud pack that sets the 'agent' and assumed it was necessary. If not necessary I'll leave it at what I have, Thanks for the response. Kevin
|
||
![]() |
Post Reply ![]() |
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |