Git Product home page Git Product logo

puppetlabs-http_request's People

Contributors

barskern avatar beechtom avatar golflimaechoecho avatar lucywyman avatar op-ct avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

puppetlabs-http_request's Issues

Reg: Basic Auth

Use Case

Hello,
I am evaluating this module to use it for REST API based management of various devices including the Datapower appliance and would like to have the ability to pass basic authentication credentials for the same, please let me know how a basic auth credential can be passed using the http_request module?

Describe the Solution You Would Like

A clear and concise description of what you want to happen.

Describe Alternatives You've Considered

A clear and concise description of any alternative solutions or features you've considered.

Additional Context

Add any other context or screenshots about the feature request here.

Add json_endpoint parameter to automatically parse body as JSON

Use Case

The http_request task should be able to automatically convert a request body to JSON, set the Content-Type header to application/json, and parse the response body as JSON.

Describe the Solution You Would Like

Create a json_endpoint parameter that will do the above.

Unable to connect to TLS end points

Describe the Bug

Hello,
I am able to connect now to HTTP end points but when I try making a HTTPS connection is when I encounter issues, the following is the typical issue I encounter although I provide it the path to the certificate, can you tell me if you have a solution for this problem, the following is the output I see when I make a TLS connection,

PS C:\WINDOWS\system32> Invoke-BoltTask -Name 'http_request' -Targets 'localhost' base_url=https://esbn12dp:8840/dev1/ json_endpoint=true cacert='C:\git-repo\puppet\certs\BSCROOTCA2.cer' cert='C:\git-repo\puppet\certs\BSCISSUECA2.cer' method=get --log-level debug
Bolt collects data about how you use it. You can opt out of providing this data.
To learn how to disable data collection, or see what data Bolt collects and why,
see http://pup.pt/bolt-analytics
[ID: analytics_opt_out]
Could not write analytics configuration to H:/.puppetlabs/etc/bolt/analytics.yaml. [ID: unwriteable_file]
Failed to initialize analytics client, analytics will be disabled: No such file or directory @ dir_s_mkdir - H:/.puppetlabs
Did not detect Boltdir or bolt-project.yaml at 'C:/WINDOWS/system32'. This directory won't be loaded as a project.
Did not detect Boltdir or bolt-project.yaml at 'C:/WINDOWS'. This directory won't be loaded as a project.
Could not create default project at H:/.puppetlabs/bolt. Continuing without a writeable project. Log and rerun files will not be written. [ID: non_writeable_project]
Loading modules from C:/Program Files/Puppet Labs/Bolt/lib/ruby/gems/2.7.0/gems/bolt-3.15.0/bolt-modules;H:/.puppetlabs/bolt/modules;H:/.puppetlabs/bolt/.modules;C:/Program Files/Puppet Labs/Bolt/lib/ruby/gems/2.7.0/gems/bolt-3.15.0/modules
Tried to load inventory from H:/.puppetlabs/bolt/inventory.yaml, but the file does not exist
Did not find config for localhost in inventory
Started with 100 max thread(s)
Starting: task http_request on localhost
Running task http_request with '{"follow_redirects":true,"json_endpoint":true,"max_redirects":20,"method":"get","base_url":"https://esbn12dp:8840/dev1/","cacert":"C:\\git-repo\\puppet\\certs\\BSCROOTCA2.cer","cert":"C:\\git-repo\\puppet\\certs\\BSCISSUECA2.cer","_task":"http_request"}' on ["localhost"]
Running task 'http_request' on localhost
{"target":"localhost","action":"task","object":"http_request","status":"failure","value":{"_error":{"kind":"http_request/connect-error","msg":"Failed to connect to https://esbn12dp:8840/dev1/: SSL_connect returned=1 errno=0 state=error: certificate verify failed (unable to get local issuer certificate)","details":{}}}}
Finished: task http_request with 1 failure in 1.64 sec
Started on localhost...
Failed on localhost:
Failed to connect to https://esbn12dp:8840/dev1/: SSL_connect returned=1 errno=0 state=error: certificate verify failed (unable to get local issuer certificate)
Failed on 1 target: localhost
Ran on 1 target in 1.75 sec
PS C:\WINDOWS\system32>

Expected Behavior

A clear and concise description of what you expected to happen.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'

Environment

  • Version [e.g. 1.27.0]
  • Platform [e.g. Ubuntu 18.04]

Additional Context

Add any other context about the problem here.

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.