I'm using pusher for a python-vuejs app.
I have a function that sends data to the pusher, the data content is {'message':{'value':id_value}}
The function is executed via an api rest POST request, when I trigger the function and send the data to the pusher on the page with the url host/data-url the pusher console shows the correct informations for the first time.
When I execute the POST request again (without refreshing the page), the data is gotten twice (gotten means that it is physically there not just a pusher console output), if i do the request again it is gotten 3 times and so on.
Does anyone have any idea on how to initialize pusher after each request or something because if I refresh the page and send the data, it works again and i get it only once.
I figured it out if anyone have the same problem.
1.You should subscribe the moment you call the page.
2.If you are triggering the channel.bind with a button click (or any event launcher ) , make sure to unbind before the click and not after.
Related
Hi I don't understand why in my website the socket requests are multiple every time I send a message
using the browser console, on the network, the call comes out every time I send a message,
look at photos;
enter image description here
you can test the chat yourself, with every message you send the request appears on the network
Testing website
https://www.awesome-easley.37-187-54-25.plesk.page/
Can you tell me, if there is a way to not make the request list appear every time you send a message? do you have any suggestions?
using the site https://socket.io/demos/chat/, for example you send messages and no prompts appear using the console
enter image description here
why does the drop-down list appear on my site at each call and instead on the socket site no call is generated at each message sending? thank you
I thought it might be because of the cache, but I don't know where to start, does anyone have any suggestions?
1) Is setting up webhook necessary to save json data of a context shared between players of context?
2) How to validate callback url for webhook on facebook developer console? My game is already live on facebook for single player. (No local testing)
3) Can I use my own personal https url to setup webhook?
No, you do not need to use the webhook to save context data. You can use XMLHttpRequest, fetch or a JavaScript SDK for a service like Playfab or Firebase to store data. In fact, we wouldn't even recommend you use a webhook for saving data because if the player turns off messages from your bot you will not receive any webhook callbacks.
You can validate a callback URL using the developer dashboard, including the "Show Recent Errors" button, which is really useful for spotting any issues. You can also get more information from the Webhooks item on the left nav.
You may need to clarify what you mean by "your own personal https url". As long as Facebook can hit your webhook URL, everything will work. You cannot, for example use a localhost URL.
I've set up a ZAP so that when a subscriber is added to my aweber email list they are automatically added to a product in my membership plugin called DAP or digital access pass.
As per the instructions of the membership plugins developers, I am using a webhook in the zapier 'post' section.
It's not working. Quite simply the webhook doesn't appear to be calling anything.
Now, weird thing is that zapier logs show the webhook has been sent and has had success. But from DAP's end nothing is being received.
The support team at DAP tell me that the script isn't being called, because nothing appears in their logs.
They show me this by putting the webhook URL into a browser and calling it that way, and THEN the relevant info arrives in the DAP logs.
Zapier told me they do not trouble shoot and so advised that I post here.
Would appreciate any help. Thank you very much.
Dan
You can easily test if Zapier is making a call or not by sending the request to http://requestb.in
Steps:
Create a request bin and copy the URL.
Request bin screenshot
In Zapier, replace the webhooks post URL with the requestb.in URL.
Now, whenever the Webhook makes a post request, you should be able to visit the inspect page of your bin and check if a request was received. Just add ?inspect to the end of the URL. For example, if your Request bin URL is https://requestb.in/wbto8jwb then you should visit https://requestb.in/wbto8jwb?inspect
The inspect page will show all the requests received.
With this, you will know if Zapier is sending the requests. If the requests are being received by request bin then there is something which needs to be fixed by DAP.
Note that it could also be something in the configuration of the Webhook that is causing the request to not be recognised by DAP. It will help if you add more details to your question - what format is the DAP team expecting to receive the data in?
Below is a sample Webhook implementation in Zapier.
I have added a hook to POST data to a request bin (https://requestb.in/wbto8jwb)
Webhook POST screenshot
When I test this step, the request is received in the Request Bin Inspect page (https://requestb.in/wbto8jwb?inspect).
Request Bin Screenshot
More reading:
https://zapier.com/help/webhooks/
Update:
You can also make a direct call to the DAP API by using a tool like https://www.hurl.it/. From the drop down in destination, select POST and put the URL here. Click on Add body and paste the raw data from request bin. Now ask the DAP team to check if the request was received.
I am working on an electron app with Angular2 for frontend. When user reaches the home page, angular starts a http.get service which initiates a hardware device which waits for user input in form of RFID cards. When user response is triggered then express returns the GET call with data. User event may occur from a few seconds to few hours. It works fine if user responds quickly but after a couple of minutes Angular doesn't show the response.
I am sorry for the unclear question details. I don't know what code to add. Any help would be highly appreciated.
Is it possible to catch the request of a page before it is sent out? I would like to check and modify the data sent out. For example if I have a text box on a page and the form was submitted I would like to get to the data of the text box using the extension modify it and then send it on it's way.
If any one can point me in the right direction that would be grate
Chrome has chrome.experimental.webRequest API module which allows to catch web requests before they are sent, but from the docs it doesn't look like you can modify them, just observe.
I think you would be better off injecting a content script to pages and listening to onbeforesubmit event on forms.