Need help on servicestack implementation

后端 未结 1 1994
情歌与酒
情歌与酒 2020-12-19 11:49

I an facing issue with my servicestack implementation, i have make followings requests url to call my service and implemented one perfmon class & perfmonservice class

相关标签:
1条回答
  • Just inspect the request DTO to see which fields are populated, i.e.

    if (request.applicationId != null && request.countername != null) #2
    if (request.userId != null && request.countername != null) #4
    if (request.applicationId != null) #1
    if (request.userid != null) #3
    

    Also note that the user can populate the request dto with the querystring as well, i.e. if they called you with:

    /perfmon/application/1/countername?userId=2
    

    Then all fields will be populated. Lastly you can retrieve information about the Request with like the Absolute URI used to call the request with:

    base.RequestContext.AbsoluteUri
    

    Finally you can get the IHttpRequest object itself with:

    var httpReq = base.Request; //or with base.RequestContext.Get<IHttpRequest>();
    
    0 讨论(0)
提交回复
热议问题