Beispiel #1
0
 protected override async Task <TResp> Handle <TReq, TResp>(string method, string path, TReq req, CancellationToken cancellationToken)
 {
     using (var message = new HttpRequestMessage(new HttpMethod(method), $"{nozomi.baseAddress}{path}"))
         using (var httpReq = new SimpleRequest(nozomi.client, cancellationToken, message, nozomi.requestSerializer, nozomi.responseSerializer))
         {
             return(await httpReq.Request <TReq, TResp>(req));
         }
 }
Beispiel #2
0
    public ChatAuthResp Register()
    {
        var register = SimpleRequest.Request <RegisterResp>(registerURL, new RegisterReq
        {
            service   = "pop",
            auth_type = "guest",
            device_id = device_id,
            player_id = player_id
        });
        var authToken = register.auth_token;

        return(SimpleRequest.Request <ChatAuthResp>(chatAuthURL, authToken: authToken));
    }