-1

我正在编写一个代码,以允许您的微服务检索您的网络的边缘云引擎链接本地集群信息,如 mimik 的页面中一样,但是在从 curl 进行 HTTP 调用后,我遇到了以下问题。

starter-microservice\build>curl -i -H "Authorization: Bearer " 
http://localhost:8083/localDevices
HTTP/1.1 404 Not Found
Cache-Control: no-cache, no-store, must-revalidate, private, max-age=0
Pragma: no-cache
Expires: 0
Content-Type: text/plain; charset=utf-8
Date: Thu, 14 Jan 2021 07:36:33 GMT
Connection: close

Error 404: Not Found
Not Found
4

1 回答 1

0

Is the microservice you are trying to call developed by you or is it the starter-microservice found here on mimik github ?

If its your own microservice then you need to call the right endpoint. One of the reasons you're getting 404 is because the endpoint cannot be found. You also need to provide the JWT token you received during edge association using OAuth Tool. You have to put the token right after the words 'Authorization: Bearer YOUR-JWT-TOKEN' in your curl command.

Please follow these tutorials in the order they appear:

  1. https://developer.mimik.com/development-setup/ Once you've finished this please copy the "edge Access Token” this is the JWT token mentioned earlier.
  2. If you have your own microservice you would like to deploy then you need to follow the instructions here: https://developer.mimik.com/deploying-edge-microservice/ if not then clone this repo from mimik Github and follow the instructions in the README.md
于 2021-01-15T17:54:23.800 回答