Jmeter HTTP请求java.net.URISyntaxException:索引71处查询中的非法字符

时间:2014-01-14 21:31:09

标签: http-post jmeter

这是我第一次遇到HTTP请求(POST)的错误。

我正在尝试做一个简单的帖子请求,不确定为什么它不能使用Jmeter

请帮助: - )


URL:

  

https://connect-qa.bglobale.com:4453/Checkout/SendCart?shippingDetails= { “COUNTRYCODE”: “LI”}&安培; clientIP = 79.120.71.29&安培; priceCoefficientRate = 1&安培; includeVAT = 0&安培; discountsList = { “DiscountValue”:29.028122604, “OriginalDiscountValue”:122.838,”名称“:”购物车折扣“,”DiscountType“:1,”VATRate“:18}& merchantCartToken = 1294& currencyCode = CHF& originalCurrencyCode = ILS& cultureCode = en-GB& preferedCultureCode = en_US& shippingOptionsList = {”Carrier“ :“flatrate”,“CarrierTitle”:“Flat Rate”,“CarrierName”:“Flat Rate”,“Code”:“flatrate_flatrate”,“Method”:“flatrate”,“MethodTitle”:“Fixed”,“MethodDescription”日期null, “价格”:0}&安培; hubId = 1&安培; merchantGUID = 0f4eec24-8988-4361-be9a-a7468d05f1fe

接头:

  

Content-Type:application / json;字符集= UTF-8

体:

[
   {
      "ProductCode":"7290012491047",
      "ProductGroupCode":null,
      "Name":"Natural and Organic Calendula Shampoo 400ml",
      "Keywords":null,
      "ProductURL":null,
      "Description":"Natural and Organic Calendula Shampoo 400ml",
      "GenericHSCode":"",
      "Weight":"0.5000",
      "Height":null,
      "Length":null,
      "Width":null,
      "Volume":null,
      "ImageURL":"/c/a/calendula_shampoo.jpg",
      "ImageWidth":"",
      "ImageHeight":"",
      "OriginCountryCode":"",
      "ListPrice":"8.90",
      "OriginalListPrice":"47.2",
      "SalePrice":"8.90",
      "OriginalSalePrice":"47.2",
      "UnitSalePriceForDuties":null,
      "OriginalSalePriceAfterGlobalEDiscount":null,
      "VATRateType":{
         "VATRateTypeCode":"2",
         "Name":"VAT",
         "Rate":18
      },
      "Brand":null,
      "Categories":[
         {
            "CategoryCode":"4",
            "Name":"Baby"
         },
         {
            "CategoryCode":"18",
            "Name":"Calendula"
         },
         {
            "CategoryCode":"20",
            "Name":"Chamomile"
         },
         {
            "CategoryCode":"24",
            "Name":"​Coconut Oil"
         },
         {
            "CategoryCode":"26",
            "Name":"Geranium Oil"
         },
         {
            "CategoryCode":"29",
            "Name":"Jojoba"
         },
         {
            "CategoryCode":"30",
            "Name":"Lavender"
         },
         {
            "CategoryCode":"38",
            "Name":"Rosemary"
         },
         {
            "CategoryCode":"39",
            "Name":"Sea Buckthorn"
         },
         {
            "CategoryCode":"42",
            "Name":"Soapwort"
         },
         {
            "CategoryCode":"45",
            "Name":"Sunflower Oil"
         }
      ],
      "OrderedQuantity":1,
      "IsBlockedForGlobalE":null
   }
]

1 个答案:

答案 0 :(得分:1)

您收到的错误表示您发送了GET个请求,而不是POST。确保在HTTP Sampler中选择了POST方法。

您可能还会发现Testing SOAP/REST Web Services Using JMeter指南很有用。