Unanswered question

400 error when Post a large json

Hi,

I got a 400 error when posting a large JSON.
When i saw the request content after the validation step, i found that the JSON body was reduced.

Do you have an idea about this problem ?

Note that the same call work fine with "Client Restful Web Service" chrome plugin.

Thanks,
Sofiane

Sofiane B.
Sofiane B.

Sofiane B.

Level
1
101 / 750
points

Answers

By default NeoLoad does not display the whole request content if it's too big. You have an option in the Advanced section of the check virtual user panel to enable the full content.

How did you create your POST request in NeoLoad? Is it manually or did you record it?

The HTTP 400 error can be due to the POST type request you choose in NeoLoad if it was done manually. Also make sure that you have the right HTTP headers in your request especially the Content-Type.

The best would be to compare that with the request sent from your Chrome plugin.

Sofiane B.
Sofiane B.

Sofiane B.

Level
1
101 / 750
points

Yes i have created it manually and the type post request that i have selected, is "Text".

I have added the header "Content-Type" with the value "application/json".

Note that it works using Firefox and chrome Restful plugins client.

Regards,
Sofiane

To avoid any manual mistake, have you tried to record that POST request in NeoLoad when you are replaying it with your Chrome plugin?

That way you will be sure that the request is exactly the same within NeoLoad.

Sofiane B.
Sofiane B.

Sofiane B.

Level
1
101 / 750
points

In fact, the body text must be encoded in ANSI to be executed from Neoload.

Does Neoload encode automatically from UTF-8 to ANSI during the record ?

Thanks,

Sofiane B.
Sofiane B.

Sofiane B.

Level
1
101 / 750
points

Kind reminder.

We have a load test for a client and we are blocked.

Thanks,

Sofiane B.
Sofiane B.

Sofiane B.

Level
1
101 / 750
points

Thank you for your prompt response !

The encoding used during the recording is based on the content of your request and related to the charset used in the request.

I guess if you use this kind of header: Content-Type: application/json; charset=windows-1252 if it's JSON or symply Content-Type: text/html; charset=windows-1252 if text only.

That should send your data with ANSI encoding.