当前位置: 首页>>代码示例>>C#>>正文


C# HttpRequest.AddQueryParameter方法代码示例

本文整理汇总了C#中HttpRequest.AddQueryParameter方法的典型用法代码示例。如果您正苦于以下问题:C# HttpRequest.AddQueryParameter方法的具体用法?C# HttpRequest.AddQueryParameter怎么用?C# HttpRequest.AddQueryParameter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在HttpRequest的用法示例。


在下文中一共展示了HttpRequest.AddQueryParameter方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Delete

 public Task Delete(JwtCredentials credentials)
 {
     var request = new HttpRequest<dynamic>("/consumers/{consumerId}/jwt/{credentialId}", HttpMethods.Delete);
     request.AddQueryParameter("consumerId", _consumer.Id);
     request.AddQueryParameter("credentialId", credentials.Id);
     return ExecuteAsync(request);
 }
开发者ID:trackmatic,项目名称:kong.net,代码行数:7,代码来源:JwtPluginRequestFactory.cs

示例2: Patch

 public Task Patch(JwtCredentials credentials)
 {
     var request = new HttpRequest<KongCollection<JwtCredentials>>("/consumers/{consumerId}/jwt/{credentialId}", HttpMethods.Patch)
     {
         Data = credentials
     };
     request.AddQueryParameter("consumerId", _consumer.Id);
     request.AddQueryParameter("credentialId", credentials.Id);
     return ExecuteAsync(request);
 }
开发者ID:trackmatic,项目名称:kong.net,代码行数:10,代码来源:JwtPluginRequestFactory.cs

示例3: List

 public async Task<IKongCollection<JwtCredentials>> List()
 {
     var request = new HttpRequest<KongCollection<JwtCredentials>>("/consumers/{consumerId}/jwt", HttpMethods.Get);
     request.AddQueryParameter("consumerId", _consumer.Id);
     var response = await ExecuteAsync(request);
     return response;
 }
开发者ID:trackmatic,项目名称:kong.net,代码行数:7,代码来源:JwtPluginRequestFactory.cs

示例4: CreateCredentials

 private Task<JwtCredentials> CreateCredentials(object data)
 {
     var request = new HttpRequest<JwtCredentials>("/consumers/{consumerId}/jwt", HttpMethods.Post)
     {
         Data = data
     };
     request.AddQueryParameter("consumerId", _consumer.Id);
     return ExecuteAsync(request);
 }
开发者ID:trackmatic,项目名称:kong.net,代码行数:9,代码来源:JwtPluginRequestFactory.cs

示例5: CreateCredentials

 public Task CreateCredentials(string username, string password)
 {
     var request = new HttpRequest<dynamic>("/consumers/{consumerId}/basic-auth", HttpMethods.Post)
     {
         Data = new
         {
             username,
             password
         }
     };
     request.AddQueryParameter("consumerId", _consumer.Id);
     return ExecuteAsync(request);
 }
开发者ID:trackmatic,项目名称:kong.net,代码行数:13,代码来源:BasicAuthRequestFactory.cs

示例6: CreateCredentials

 public Task CreateCredentials(string key)
 {
     var request = new HttpRequest<dynamic>("/consumers/{consumerId}/key-auth", HttpMethods.Post)
     {
         Data = new
         {
             key,
             consumer_id = _consumer.Id
         }
     };
     request.AddQueryParameter("consumerId", _consumer.Id);
     return ExecuteAsync(request);
 }
开发者ID:trackmatic,项目名称:kong.net,代码行数:13,代码来源:KeyAuthRequestFactory.cs


注:本文中的HttpRequest.AddQueryParameter方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。