Hi,
I want to tell the browser widget that it should ask the website for a representation in a specific language. As I have understood so far, this information has to be put in the httpheader: https://developer.mozilla.org/en-US/doc ... t-Language
But how can I configure the browser widget in this way like e.g. Firefox did it in Settings / Preferred language?
Cheers,
Torsten
How to put Accept-Language into Browser-Widget requests?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 57
- Joined: Mon Oct 28, 2013 1:23 pm
- Location: Dresden, Germany
Re: How to put Accept-Language into Browser-Widget requests?
hello TorstenHolmer
Use the httpHeaders property to provide custom headers when interacting with servers that require them.
look in the dictionary.
I think this is what you need
Use the httpHeaders property to provide custom headers when interacting with servers that require them.
look in the dictionary.
I think this is what you need
Re: How to put Accept-Language into Browser-Widget requests?
I think here is the answer to your question.
I copied this code from: https://stackoverflow.com/a/49675084/12042538
Code: Select all
put "ABCD" into clientId
put "1234" into clientSecret
put "Authorization: Basic" && base64Encode("clientId:clientSecret") & return & "Content-Type: application/json" & return & "Cache-Control: no-cache" into tHeader
set the httpHeaders to tHeader
post receiveMomoRequest to url "https://server/v1/merchantaccount/merchants/HMXXXXXX/receive"
-
- Posts: 57
- Joined: Mon Oct 28, 2013 1:23 pm
- Location: Dresden, Germany
Re: How to put Accept-Language into Browser-Widget requests?
Hi andresdt,
thanks for the information but maybe I explained my problem not detailed enough. I want to navigate and load webpages with the browser widget and I am not using POST or GET command to get the page content.
So the problem is: how to tell the browser widget that it should use the httpheader definitions?
Cheers,
Torsten
thanks for the information but maybe I explained my problem not detailed enough. I want to navigate and load webpages with the browser widget and I am not using POST or GET command to get the page content.
So the problem is: how to tell the browser widget that it should use the httpheader definitions?
Cheers,
Torsten
-
- Posts: 57
- Joined: Mon Oct 28, 2013 1:23 pm
- Location: Dresden, Germany
Re: How to put Accept-Language into Browser-Widget requests?
I made some progress but also saw a strange behavior of the widget:
If you create a stack with browser widget und a buttion with this script:
Than the reply of the site will be the language setting of your computer ( in my case de-de) but not the language of the httpheaders.
Does anybody knows why?
It seems, that setting httpheaders does not work together with the browser widget.
Cheers,
Torsten
If you create a stack with browser widget und a buttion with this script:
Code: Select all
on mouseup
set the httpheaders to "Accept-Languages: fr"
set the url of widget "Browser" to "https://manytools.org/http-html-text/browser-language/"
end mouseup
Does anybody knows why?
It seems, that setting httpheaders does not work together with the browser widget.
Cheers,
Torsten