• 0
Sign in to follow this  
smiten

Getting error when post api call

Question

Hello mercadolibre Community,

I posted one item in mercadolibre api .I got this error {"message": "body.invalid", "error": "A body is expected. (B)", "status": 400, "cause": [] }.

My code is based on C #.( var responce = m.Post("/items", ps, body) )

My body passed through Rest Client (Extension of  chrome) or postman provided accurate result but  my c# code gave above error.

Thank you in advance.Please help me.

error.png

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Hello Wesley Nascimento

I got solution yesterday.I passed json object of particular class but api need Object instance so , I will configure class as a object.

api gives acccurate result.

Thank you for your replay.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this