RagHaven
RagHaven

Reputation: 4347

Using Fiddler to generate POST request with body

I have a node.js service and it accepts POST requests. I am trying to use Fiddler to generate the post request. However, when I print the request body in my service, I get an empty object with no data in it. I set the request body in Fiddler to something such as {key:value}. When printing request.body in the node.js service I get an empty object {}.

The request header:

User-Agent: Fiddler
Host: localhost:3000
Content-Length: 10

The body:

{ key:ky }

What am I doing wrong here?

Upvotes: 3

Views: 7370

Answers (1)

Alexander Boychenko
Alexander Boychenko

Reputation: 286

In the header: Content-Type: application/json In the body: {"key": "value"}

Upvotes: 7

Related Questions