httppull.yaml 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. #Global httppull configurations
  2. default:
  3. # url of the request server address
  4. url: http://localhost
  5. # post, get, put, delete
  6. method: post
  7. # The interval between the requests, time unit is ms
  8. interval: 10000
  9. # The timeout for http request, time unit is ms
  10. timeout: 5000
  11. # If it's set to true, then will compare with last result; If response of two requests are the same, then will skip sending out the result.
  12. # The possible setting could be: true/false
  13. incremental: false
  14. # # The body of request, such as '{"data": "data", "method": 1}'
  15. # body: '{"data": "data", "method": 1}'
  16. # Body type, none|text|json|html|xml|javascript|form
  17. bodyType: json
  18. # Control if to skip the certification verification. If it is set to true, then skip certification verification; Otherwise, verify the certification
  19. insecureSkipVerify: true
  20. # HTTP headers required for the request
  21. headers:
  22. Accept: application/json
  23. # how to check the response status, by status code or by body
  24. responseType: code
  25. # # Get token
  26. # oauth:
  27. # # Access token fetch method
  28. # access:
  29. # # Url to fetch access token, always use POST method
  30. # url: https://127.0.0.1/api/token
  31. # # Body of the request
  32. # body: '{"username": "admin","password": "123456"}'
  33. # # Expire time of the token in string, time unit is second, allow template
  34. # expire: '3600'
  35. # # Refresh token fetch method
  36. # refresh:
  37. # # Url to refresh the token, always use POST method
  38. # url: https://127.0.0.1/api/refresh
  39. # # HTTP headers required for the request, allow template from the access token
  40. # headers:
  41. # identityId: '{{.data.identityId}}'
  42. # token: '{{.data.token}}'
  43. # # Request body
  44. # body: ''
  45. neuron:
  46. # url of the request server address
  47. url: http://127.0.0.1:7000/api/v2/node/state
  48. # post, get, put, delete
  49. method: get
  50. # The interval between the requests, time unit is ms
  51. interval: 10000
  52. # The timeout for http request, time unit is ms
  53. timeout: 5000
  54. # If it's set to true, then will compare with last result; If response of two requests are the same, then will skip sending out the result.
  55. # The possible setting could be: true/false
  56. incremental: false
  57. # Body type, none|text|json|html|xml|javascript|form
  58. bodyType: json
  59. # Control if to skip the certification verification. If it is set to true, then skip certification verification; Otherwise, verify the certification
  60. insecureSkipVerify: true
  61. # HTTP headers required for the request
  62. headers:
  63. Accept: application/json
  64. Authorization: 'Bearer {{.token}}'
  65. # how to check the response status
  66. responseType: code
  67. # Get token
  68. oauth:
  69. # Access token fetch method
  70. access:
  71. # Url to fetch access token, always use POST method
  72. url: http://127.0.0.1:7000/api/v2/login
  73. # Body of the request
  74. body: '{"name": "admin","pass": "0000"}'
  75. # Expire time of the token, time unit is second, allow template
  76. expire: '3600'
  77. #Override the global configurations
  78. application_conf: #Conf_key
  79. incremental: true
  80. url: http://localhost:9090/