需要使用HttpClient()从c#代码传递`Client-Id`标头参数来调用Rest API Post方法

时间:2019-02-13 18:55:04

标签: asp.net api asp.net-web-api swagger

我在Swagger Resp Api中有一个Curl,//To display the ACF custom field 'shpng' below the product title on cart page function lh_cart_item_sub_title( $cart_item ) { $shpng = get_field( 'shpng', $cart_item['product_id'] ); echo "<div class='small custom-cart-shipping-date'>My Custom Shipping Date: $shpng.</div>"; } add_action( 'woocommerce_after_cart_item_name', 'lh_cart_item_sub_title', 10, 1 ); 如何使用HttpClient()请求标头从c#代码传递curl -X POST "https://petstore.swagger.io/v2/pet/11" -H "accept: application/xml" -H "Content-Type: application/x-www-form-urlencoded" -H "Client-Id: example.demo.com" -d "name=James&status=K"

0 个答案:

没有答案