NetTalk Central

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Bruce

Pages: [1] 2 3 ... 744
1
Web Server - Ask For Help / Re: sending SMS via GSM Modem
« on: June 14, 2025, 11:15:58 PM »
more likely you'll use the WinEvent Serial Port functions.
It all depends on your SMS modem, and how it connects to the PC.

Cheers
Bruce

2
Web Server - Ask For Help / Re: Api endpoint stream - how?
« on: May 22, 2025, 07:01:32 PM »
Hi Niels,

>> I have some static ftp files that I need to expose via a REST api.

are you over thinking this?
It sounds to me like you just put the static file in the web folder (or sub folder), then the client can just GET it (ie use a regular WebClient to Fetch the file.)

I'm not sure this needs to be in an API?

But assuming it does need to be an API;

Add a StringTheory object to the RETURNS tab of the API.
Put your file in there (probably Base64 encoded.)

>> I'm aware that I can BASE64 encode them but the client would prefer them as "files".

Hence my suggestion above that this is just a regular GET.
If you want more control, then check out the FileDownload (40) example. That has a generic "ServeDocument" procedure in the app for serving files.

An API method will return a JSON or XML response - and of course any binary in there would need to be appropriately encoded at the very least for Json or XML.
I recommend Base64 because that's easier.

Cheers
Bruce




Cheers
Bruce


3
Web Server - Ask For Help / Re: Hide Webcam after photo is taken
« on: May 21, 2025, 05:52:31 PM »
>>  as if the webcam is set to ALWAYS display no matter what the programmer (like me) is trying to do.

*how* are you trying to make it "not display" ?


4
Web Server - Ask For Help / Re: Api endpoint stream - how?
« on: May 19, 2025, 07:20:40 PM »
Can you define a bit more what you mean by "stream" a PDF file?
Tell us a bit more abut the context for this, and how "streaming" would be different from the normal "serving" ?

cheers
Bruce

5
I think you're over thinking this.
The Take Photo button takes the photo, and sends it to the server.
So you can process it however you like on the server.

The browser really only needs to update the displayed picture after processing.

We can chat in the webinar if you need more ideas.

Cheers
Bruce

6
try
    p_web.HeaderDetails.ContentDisposition =  'attachment; filename="'& CLIP(Loc:DownloadFileName) &'"'
    p_web.HeaderDetails.CacheControl = 'no-store, no-cache, must-revalidate, private,post-check=0, pre-check=0, max-age=0'


7
first you need to determine if it's coming from the local client cache, or the server cache.
(Both the browser, like Chrome or Edge) and the NetTalk server can cache files.

There are headers you can set when serving the file to indicate it's uncacheable. (You can google for that if you like, or look in netweb.clw.)
Alternatively you can alter the URL - by adding a random parameter. For example;

capesoft.com\somefile.saf?r=123
is different from
capesoft.com\somefile.saf?r=321

So simple by adding a parameter (which the server happily ignores) with a random value, the client won't get it from cache.
Obviously though it depends on how they are seeing the URL in the first place to download the file.

Cheers
Bruce

9
Web Server - Ask For Help / Re: Webclient with certificat
« on: May 08, 2025, 06:03:43 PM »
Not sure if this is helpful - but see NetDemo, NetWebClient, "Secure HTTPS Options" tab, Client Certificate option.
If you can get it working from there, you'll be golden.

Cheers
Bruce

10
Web Server - Ask For Help / Re: NetWebServiceMethod as REST - HOW?
« on: May 04, 2025, 09:50:26 PM »
>> But the customer wants it like this:
http://127.0.0.1/WasteInvoice/InvoiceOverview/account/{accountId}/customer/{customerId}

Have you told him how much extra that pattern will cost? I find that putting a price on it lets you determine how much they "actually want it".

>> Does that make sense?

yes.
To do this though you will need to parse the WholeURL yourself, likely in webHandler, setting the values as you interpret them (ie with a call to SetValue).
It's not terribly hard to do, but obviously is a custom approach to both parsing the values, and then redirecting the request to the correct API.

For example, in this URL I presume WasteInvoice is the name of the NetWebService, and InvoiceOverview is the name of the NetWebSericeMethod.
You *may* find it parses that sufficiently to get the call into the NetWebServiceMethod procedure, or you may need to parse it in webHandler.
Once you are in the method, you can then parse the URL further to find the account and customer ID. That's pretty easy to do with StringTheory etc.

Cheers
Bruce

11
Web Server - Ask For Help / Re: Refresh NWB Header
« on: April 25, 2025, 10:46:32 PM »
ahhh - so when you said "the browse header" you meant in a routine that you happened to name "header".
A small detail, that probably matters with regard to the answers.

The item you are updating in this header, is it specific to this user, or common across all users using the server? It seems like it's a value unique to this user?

Your best option is to make a small example app showing what it is you want to do, and I can look at that and suggest something from there...

Cheers
Bruce

12
Web Server - Ask For Help / Re: Refresh NWB Header
« on: April 23, 2025, 07:18:51 PM »
define what you mean by "browse header" ?

13
Web Server - Ask For Help / Re: Pass parameter in servercall?
« on: April 16, 2025, 06:45:26 PM »
p_web.StoreValue('a')
Is the best way to set a session value to a value, because then if the value doesn't exist (as a parameter) it does not overwrite the session value.
I expect you are just overwriting your session value to blank when the value does not exist.

14
just out of curiosity - does a double tap on the phone open them?
Does the first tap open the tooltip?

15
Web Server - Ask For Help / Re: Wrong encoding of text on maps
« on: March 24, 2025, 11:43:24 PM »
thanks - fixed for 14.30

Pages: [1] 2 3 ... 744