Giter Club home page Giter Club logo

Comments (10)

moorereason avatar moorereason commented on June 8, 2024

This is probably a duplicate of #615. What does you payload look like?

from webhook.

adnanh avatar adnanh commented on June 8, 2024

Hmm, seems to work with 2.8.0

from webhook.

alexwesemann avatar alexwesemann commented on June 8, 2024

from webhook.

alexwesemann avatar alexwesemann commented on June 8, 2024

from webhook.

alexwesemann avatar alexwesemann commented on June 8, 2024

from webhook.

alexwesemann avatar alexwesemann commented on June 8, 2024

from webhook.

alexwesemann avatar alexwesemann commented on June 8, 2024

from webhook.

alexwesemann avatar alexwesemann commented on June 8, 2024

Gents, I cannot find the hook anywhere in any folder. This is what is coming through while running Webhook:

[webhook] 2023/05/25 09:31:50 [df23ab] incoming HTTP POST request from 127.0.0.1:42954
[webhook] 2023/05/25 09:31:50 [df23ab] redeploy-webhook got matched
[webhook] 2023/05/25 09:31:50 [df23ab] redeploy-webhook hook triggered successfully
[webhook] 2023/05/25 09:31:50 [df23ab] 200 | 0 B | 188.526µs | 127.0.0.1:9000 | POST /hooks/redeploy-webhook
[webhook] 2023/05/25 09:31:50 [df23ab] executing /home/debian/hooks/redeploy-webhook/redeploy.sh (/home/debian/hooks/redeploy-webhook/redeploy.sh) with arguments ["/home/debian/hooks/redeploy-webhook/redeploy.sh" "{"Accept":"text/plain, application/json, application/+json, /","Accept-Encoding":"gzip,deflate","Connection":"close","Content-Length":"416","Content-Type":"application/json","Things-Device-Barcode":"NULL","Things-Message-Token":"c3a62f7b43b3cbfef1895088924c87935ccc752693c557e9c656dcc7b6f098b3","Things-Plug-Uuid":"4aff6a7c-8d9b-44a2-b984-700c777be714","User-Agent":"axios/0.24.0"}" "{"root":[{"bn":"urn:dev:IMEI:86*********1814:","bt":1.684999803E9},{"n":"CPU temperatuur","u":"Cel","v":41.16},{"n":"GPRS-signaal","u":"count","v":27.0},{"n":"Hoogte in masl","u":"count","v":1.0},{"n":"Actuele grondsnelheid in km/h","u":"count","v":0.0},{"n":"Aantal gevonden satellieten","u":"count","v":1.0},{"n":"Totale schijfruimte in Gb","u":"count","v":14.0},{"n":"Beschikbare schijfruimte in Gb","u":"count","v":9.0}]}"] and environment [] using /var/www/html/hooks/redeploy-webhook as cwd
[webhook] 2023/05/25 09:31:50 [31c5f8] command output: mysql: [Warning] Using a password on the command line interface can be insecure.
mysql: [Warning] Using a password on the command line interface can be insecure.

[webhook] 2023/05/25 09:31:50 [31c5f8] finished handling redeploy-webhook
[webhook] 2023/05/25 09:31:50 [df23ab] command output: mysql: [Warning] Using a password on the command line interface can be insecure.
mysql: [Warning] Using a password on the command line interface can be insecure.

I would expect to find the webhook in the folder /var/www/html/hooks/redeploy-webhook but its empty.
Does it have to do with the fact that <[webhook] 2023/05/25 09:31:50 [df23ab] 200 | 0 B | 188.526µs | 127.0.0.1:9000 | POST /hooks/redeploy-webhook?> states 0 B??? Is it all empty?? I am really stuck here.

Anyone?
KR Alex

from webhook.

moorereason avatar moorereason commented on June 8, 2024

I think you're misunderstanding what webhook does. webhook parses a web request and passes parts of that request to a local script or executable. It's up to the script or executable to do something useful with what's passed to it.

Your config is telling webhook to pass a JSON representation of the entire headers and payload to your script, but your script isn't doing anything with the parameters that are passed to it. It's only appending stuff to a log file.

from webhook.

alexwesemann avatar alexwesemann commented on June 8, 2024

from webhook.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.