gpt4 book ai didi

content-management-system - 如何知道crafter-profile 或crafter-social 是否正在运行?

转载 作者:行者123 更新时间:2023-12-04 19:30:02 27 4
gpt4 key购买 nike

我正在尝试找到一个合适的 URL,它会在 Crafter-profile 和 Crafter-social 上返回 404 以外的其他内容,以便我确定它们存在于 tomcat 中。

我可以使用任何api/其他网址吗?

谢谢,

尼古拉斯

最佳答案

对于社交:

  • 404 消息是自定义消息( https://github.com/cortiz/social/blob/2.5.x/server/src/main/webapp/404.jsp ),您可以检查响应的 HTML 以查看是容器默认值(或 apache)还是应用程序提供的消息。
  • 使用 curl 或浏览器调用获取线程(可以不存在):/crafter-social/api/3/threads/test/comments?context=f5b143c2-f1c0-4a10-b56e-f485f00d3fe9你应该得到这样的回复:

  • HTTP/1.1 200
    Access-Control-Allow-Origin: *

    Access-Control-Allow-Methods: POST, GET, PUT, DELETE

    Access-Control-Max-Age: 3600

    Access-Control-Allow-Headers: x-requested-with

    Access-Control-Allow-Credentials: false

    Content-Type: application/json;charset=UTF-8

    Transfer-Encoding: chunked

    Date: Tue, 13 Jun 2017 16:45:31 GMT

    {"total":0,"pageSize":666,"pageNumber":0,"watched":false,"comments":
    []}
  • curl Swagger 文档服务:/crafter-social/api-docs

  • `
    HTTP/1.1 200
    访问控制允许来源:*
    访问控制允许方法:POST、GET、PUT、DELETE
    访问控制最大年龄:3600
    Access-Control-Allow-Headers: x-requested-with
    访问控制允许凭据:false
    内容类型:application/json;charset=UTF-8
    传输编码:分块
    日期:2017 年 6 月 13 日,星期二 17:12:45 GMT
    {"apiVersion":"1.0","swaggerVersion":"1.2","apis":[{"path":"/default/comment-services","description":"Comments services"},{"path":"/default/comment-services-extension","description":"Comments services Extension"},{"path":"/default/handles-context-configuration","description":"Creates and associates Social Context to profiles"},{"path":"/default/security-actions","description":"Services to Admin Security Actions"},{"path":"/default/system-profile","description":"Clears profile cache,Only for Social Admins or Super Admins."},{"path":"/default/threads-controller","description":"Threads Controller"}],"info":{"title":"API Title","description":"API Description","termsOfServiceUrl":"API terms of service","contact":"API Contact Email","license":"API Licence Type","licenseUrl":"API License URL"}}%  

    `

    对于个人资料:
  • 使用 curl 或浏览器使用不存在的访问 token 进行调用以从不存在的用户获取属性:/crafter-profile/api/1/profile/12333/attributes?accessTokenId=12345你应该得到这样的回复:

  • `
    HTTP/1.1 403 
    Content-Type: application/json;charset=UTF-8
    Transfer-Encoding: chunked
    Date: Tue, 13 Jun 2017 17:03:39 GMT

    {"errorCode":"NO_SUCH_ACCESS_TOKEN_ID","message":"No access token found for ID \"12345\""}%

    `

    注:
    所有给定的选项都不是最佳的,请随时在此处创建功能请求: https://github.com/craftercms/craftercms/issues为 Profile 和 Social 构建合适的 REST 心跳监控服务。

    ** 笔记2**
    以上所有仅对 2.5.x 有效。

    关于content-management-system - 如何知道crafter-profile 或crafter-social 是否正在运行?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44526909/

    27 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com