Coder Social home page Coder Social logo

gonimrod's People

Contributors

altavares avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

gonimrod's Issues

Website has wrong code for sending an image via cURL

Awesome program, thank you xurei!
I just started testing it yesterday.
I notice on the nimrod-messenger.io website, the cURL code provided for sending an image is:

curl -X POST -H "Content-Type: application/json" -d '{
  "api_key": "API_KEY",
  "message":"My First Message"
}' "https://www.nimrod-messenger.io/api/v1/message"

As you can see, that's the same code that is used for sending a message. So, it doesn't send an image.

Please let me know when the website shows how to send an image via cURL, so I can try doing it.

Thanks.

Linux cURL code to use variable API key & message

Hi xurei,

I'm trying to write a bash script to send a message with nimrod via cURL. It works when I hard code the API key and message into the cURL command, but I can't get it to work when I try to use them in variables. I've tried changing the quotes (') to (") so the variable is not taken literally, but it still fails. For example, this code:

API_KEY=99x9999-x9x9-9x9x-9999999999   # Changed for privacy
MSG="This is a test"

curl -X POST -H "Content-Type: application/json" -d "{
        'api_key': '$API_KEY',
        'message': '$MSG'
}" "https://www.nimrod-messenger.io/api/v1/message"

Gives this error:

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>SyntaxError: Unexpected token &#39; in JSON at position 3<br> &nbsp; &nbsp;at JSON.parse (&lt;anonymous&gt;)<br> &nbsp; &nbsp;at parse (/var/www/nimrod/node_modules/body-parser/lib/types/json.js:88:17)<br> &nbsp; &nbsp;at /var/www/nimrod/node_modules/body-parser/lib/read.js:116:18<br> &nbsp; &nbsp;at invokeCallback (/var/www/nimrod/node_modules/raw-body/index.js:262:16)<br> &nbsp; &nbsp;at done (/var/www/nimrod/node_modules/raw-body/index.js:251:7)<br> &nbsp; &nbsp;at IncomingMessage.onEnd (/var/www/nimrod/node_modules/raw-body/index.js:307:7)<br> &nbsp; &nbsp;at IncomingMessage.emit (node:events:406:35)<br> &nbsp; &nbsp;at IncomingMessage.emit (node:domain:475:12)<br> &nbsp; &nbsp;at endReadableNT (node:internal/streams/readable:1343:12)<br> &nbsp; &nbsp;at processTicksAndRejections (node:internal/process/task_queues:83:21)</pre>
</body>
</html>

Any ideas how to resolve this?

Thanks.

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.