Trigger homebridge-http-switch button by HTTP request - homekit

Is it possible to trigger homebridge-http-switch button (dummy button) by internal HTTP request?
For example, I have a shelly relay and it can send HTTP requests on status changes. I would like to trigger this dummy button in this way.
Is it any other dummy button like this?

Related

How to get if http request aborted in Angular 2?

I use a loading bar plugin to show user if there is an http request. But sometimes, user clicks for a new route (I use angular's routing) and (I guess) http request automatically aborted by angular. Therefore I can't know I should stop the loading bar.
How can I handle this?
P.S.: I handle all http request in a service file.

Jmeter- how to deal with popup?

I recorded using a proxy server and cannot see the pop up got recorded. My pop is a Confirm popup so I cannot use HTTP Authorization manager. I have to click on OK on this pop up to get to next page. What do I use for this kind of pop up?
Thank you
When you click on OK, Does the page get submitted to server?
JMeter will record all the HTTP requests. Jmeter does not execute javascript as the browser does. So, The popup/alert you got, might have been triggered by a Javascript just for some confirmation which JMeter can not record. If the user action on the pop up had triggered any HTTP request, JMeter would have recorded the HTTP request to go the next page!.

How can I send HTTP request to click button on the page with JMeter

How can I send HTTP request to click button on the page with JMeter. For example button on the page is
<button type="button" id="StartButton" onclick="CreateConversation()">Start chat</button>
HTTP request does not interact with page elements. It sends out HTTP requests to server. You can use it to send the HTTP request that would occur if your button is clicked.
If you're interested in interacting with UI elements, look into the jmeter-webdriver plugin.
Webdriver is very heavy though. Unless you absolutely need to interact with your page elements, it is a better idea to stick with HTTP Request. You can capture the HTTP request generated by the button click using jmeter's recording proxy. See here.

JSF server side validation on browser back button hit

Is there any way to differentiate a browser back button request and a submit request in the listener?
Is there a way to do server side validation when a user hits browser back button & forward button consecutively?
Is there any way to differentiate a browser back button request and a submit request in the listener?
Not in the server side. The back button request is namely not necessarily been sent to the server, but instead requested on the browser's cache.
Is there a way to do server side validation when a user hits browser back button & forward button consecutively?
Just tell the browser to not cache the page at all. This way it will guarantee send a full request to the server side where all the associated code will be invoked.
You can find a kickoff example of such a filter in this answer: Avoid back button on JSF web application.

How to find whether Ajax request successfully send by Fire-bug add-on?

Please can some one explain me how to use Fire-bug add-on to check about whether Ajax request successfully send from our application ???
When you turn on Firebug, there's tab called 'Network' - there are shown all requests, especially ajax. The network tab allows you to filter requests and check request/response headers, status code, and message.
So, if you turn on Firebug and open Network tab (it's possible you'll have to enable tracking first, in that case it will show appropriate message), you will see if there was a request, where you expected it should be.
To see only ajax requests, check XHR on top bar, just under general tabs.
It will display in 'console' tab in firebug. i show you ajax call and request. it show ajax request like if ajax is successful then is gives 200 request and display the data or if the ajax request if fails is gives you a 301 request or some other request.

Resources