0
votes

I am novice with Jmeter and I want to POST this body

{
   "key": {
      "hash": "599ba25a0d7c7d671bee93172ca7e272fc87f0c0e02e44df9e9436819067ea28",
      "hashAlgo": "SHA256"
   },
   "event": {
      "name": "TEST_CHAINCODE_4",
      "timestamp": "2020-04-23T16:10:00Z",
      "appId": "DATAROOM",
      "userId": "RKA",
      "metadata": {},
      "manifest": "ZGZoc2RlaGpzcnRoamRyZXRocmVzaGpkcmZzaGpkcmVoanJzaA=="
   }
}

But I have this error

{ "type" : "http://www.jhipster.tech/problem/problem-with-message", "title" : "Bad Request", "status" : 400, "detail" : "JSON parse error: Unexpected character ('-' (code 45)) in numeric value: expected digit (0-9) to follow minus sign, for valid numeric value; nested exception is com.fasterxml.jackson.core.JsonParseException: Unexpected character ('-' (code 45)) in numeric value: expected digit (0-9) to follow minus sign, for valid numeric value\n at [Source: java.io.PushbackInputStream@607e653e; line: 1, column: 3]", "path" : "/api/2.0/data", "message" : "error.http.400" }

In my header manager I added this headers: enter image description here

Could you help me solve this problem?

1

1 Answers

0
votes

It's hard to say where exactly the problem is without seeing your HTTP Request sampler configuration, but my crystal ball suggests checking the state of Use multipart/form-data checkbox

enter image description here

It must not be ticked

In general HTTP Status 400 means "Bad request" so something is definitely wrong with your request URL, headers or body