Jmeter HTTP请求java.net.URISyntaxException:索引71处查询中的非法字符 [英] Jmeter HTTP request java.net.URISyntaxException: Illegal character in query at index 71

查看:1006
本文介绍了Jmeter HTTP请求java.net.URISyntaxException:索引71处查询中的非法字符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

It's the first time I'm encountering this error for HTTP request (POST).

我正在尝试做一个简单的帖子请求,不知道为什么呢无法使用 Jmeter

I'm trying to do a simple post request, not sure why it doesn't work using the Jmeter.

请帮助: - )


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,Name:Cart Discount,DiscountType :1, VATRate:18}&安培; merchantCartToken = 1294&安培; CURRENCYCODE = CHF&安培; originalCurrencyCode = ILS&安培; cultureCode = EN-GB&安培; preferedCultureCode = EN_US&安培; shippingOptionsList = { 载波: flatrate, CarrierTitle:平Rate,CarrierName:Flat Rate,Code:flatrate_flatrate,Method:flatrate,MethodTitle :Fixed,MethodDescription:null,Price:0}& hubId = 1& merchantGUID = 0f4eec24-8988-4361-be9a-a7468d05f1fe

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,"Name":"Cart Discount","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,"Price":0}&hubId=1&merchantGUID=0f4eec24-8988-4361-be9a-a7468d05f1fe



标题:



Headers:


Content-Type:application / json; charset = utf-8

Content-Type: application/json; charset=utf-8



正文:



Body:

[
   {
      "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
   }
]


推荐答案

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

The error you're receiving indicates that you're sending a GET request, not POST. Make sure that you have selected POST method in HTTP Sampler.

您还可以找到使用JMeter测试SOAP / REST Web服务指南很有用。

You may also find Testing SOAP/REST Web Services Using JMeter guide useful.

这篇关于Jmeter HTTP请求java.net.URISyntaxException:索引71处查询中的非法字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆