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


C# Client.MakePostRequest方法代码示例

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


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

示例1: Create

 public static async Task<Lidb> Create(Client client, Lidb item)
 {
     using (var response = await client.MakePostRequest(client.ConcatAccountPath(LidbPath), item))
     {
         return await Get(client, client.GetIdFromLocationHeader(response.Headers.Location));
     }
 }
开发者ID:dwimsey,项目名称:csharp-bandwidth-iris,代码行数:7,代码来源:Lidb.cs

示例2: Create

 public static async Task<string[]> Create(Client client, params TnLineOptions[] options)
 {
     return
         (await
             client.MakePostRequest<LineOptionOrderResponse>(client.ConcatAccountPath(LineOptionOrderPath),
                 new LineOptionOrderRequest {TnLineOptions = options})).LineOptions.CompletedNumbers;
 }
开发者ID:dwimsey,项目名称:csharp-bandwidth-iris,代码行数:7,代码来源:LineOptionOrder.cs

示例3: Check

 public static Task<NumberPortabilityResponse> Check(Client client, string[] numbers, bool fullCheck = false)
 {
     var request = new NumberPortabilityRequest
     {
         TnList = numbers
     };
     return client.MakePostRequest<NumberPortabilityResponse>(string.Format("{0}?fullCheck={1}", client.ConcatAccountPath(LnpCheckerPath), fullCheck.ToString().ToLower()), request);
 }
开发者ID:dwimsey,项目名称:csharp-bandwidth-iris,代码行数:8,代码来源:LnpChecker.cs

示例4: AddNote

 public static async Task<Note> AddNote(Client client, string orderId, Note note)
 {
     using (var response = await client.MakePostRequest(client.ConcatAccountPath(string.Format("{0}/{1}/notes", PortOutPath, orderId)), note))
     {
         var list = await GetNotes(client, orderId);
         var id = client.GetIdFromLocationHeader(response.Headers.Location);
         return list.First(n => n.Id == id);
     }
 }
开发者ID:dwimsey,项目名称:csharp-bandwidth-iris,代码行数:9,代码来源:ImportToAccount.cs

示例5: Create

 public static Task Create(Client client, string orderName, params string[] numbers)
 {
     var order = new DisconnectTelephoneNumberOrder
     {
         Name = orderName,
         DisconnectTelephoneNumberOrderType = new DisconnectTelephoneNumberOrderType
         {
             TelephoneNumbers = numbers
         }
     };
     return client.MakePostRequest(client.ConcatAccountPath(DisconnectNumbersPath), order, true);
 }
开发者ID:dwimsey,项目名称:csharp-bandwidth-iris,代码行数:12,代码来源:Disconnect.cs

示例6: Create

 public async static Task<LnpOrderResponse> Create(Client client, PortIn order)
 {
     var item = await client.MakePostRequest<LnpOrderResponse>(client.ConcatAccountPath(PortInPath), order);
     item.Client = client;
     return item;
 }
开发者ID:dwimsey,项目名称:csharp-bandwidth-iris,代码行数:6,代码来源:PortIn.cs

示例7: Create

 public static Task<OrderResult> Create(Client client, Order item)
 {
     return client.MakePostRequest<OrderResult>(client.ConcatAccountPath(OrderPath), item);
 }
开发者ID:dwimsey,项目名称:csharp-bandwidth-iris,代码行数:4,代码来源:Order.cs


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