Skip to content

Desi banjara

  • Nikon D5600 Cameras
  • “Believe that life is worth living and your belief will help create the fact.”– William James Motivational & Inspirational Quotes
  • Microsoft AI-900 Certification Exam Practice Questions -5 Microsoft AI-900 Certification Exam
  • How many people are lucky enough to treat their headache and fever by the healing strokes of their mother? Happy Birthday Mom Birthday Wishes For Mom
  • I wish you a year loaded with the most amazing moments to cherish. Birthday Wishes
  • “A problem is a chance for you to do your best.”– Duke Ellington Motivational & Inspirational Quotes
  • How to share an account on Amazon kindle? Amazon Kindle
  • Interview question: In c#, How can we create a function which can accept varying number of arguments? C# development

Error while sending json model in POST request to web API service using postman

Posted on July 18, 2017 By DesiBanjara 1 Comment on Error while sending json model in POST request to web API service using postman

In order to test my I was testing my webApi post method, I need to send model object as parameter. I was sending it as raw data but it was giving error

“{“Message”:”The request entity’s media type ‘text/plain’ is not supported for this resource.”,”ExceptionMessage”:”No MediaTypeFormatter is available to read an object of type ” from content with media type ‘text/plain’…..

My raw data was in below format

{

“Id”: 1,

“Email”: “test@test.com”,

“UserID”: 19530,

“ContactId”: null,

“TnC”: true,

“TnCAcceptanceDate”: “0001-01-01T00:00:00”,

“Prefix”: null,

“Country”: null,

“PostalCode”: null

}

After some research I found my mistake. In the HTTP request you need to set Content-Type to: Content-Type: application/json

Content type in my Post request was selected as “text/plain” which should be application/json. After changing it to “application/json”, it worked for me.

ASP.NET Web API, postman Tags:ASP.NET Web API, postman, Web development

Post navigation

Previous Post: How to fall in love?
Next Post: 75 Best inspiring quotes on Leadership

Related Posts

  • WCF (Windows Communication Foundation) Interview questions ASP.NET Web API
  • What is ASP.NET Web API ? ASP.NET Web API
  • Asp.Net WebApi Interview Questions – Cont. ASP.NET Web API
  • How to enable cors in WebApi to handle request from different subdomains? ASP.NET Web API
  • Asp.Net WebApi Interview Questions ASP.NET Web API

Comment (1) on “Error while sending json model in POST request to web API service using postman”

  1. Yosianus says:
    May 17, 2018 at 2:37 am

    i already followed your instruction to change Content-Type, but i still get the same error notification. You know what’s my mistake?

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *



Archives

  • February 2023
  • February 2022
  • June 2021
  • March 2021
  • January 2021
  • December 2020
  • November 2020
  • October 2020
  • September 2020
  • July 2020
  • June 2020
  • April 2020
  • December 2019
  • December 2018
  • November 2018
  • October 2018
  • September 2018
  • August 2018
  • July 2018
  • June 2018
  • May 2018
  • April 2018
  • January 2018
  • September 2017
  • August 2017
  • July 2017
  • June 2017
  • May 2017
  • April 2017
  • August 2015
  • May 2015
  • April 2014
  • November 2013

Categories

  • Acer
  • Amazon AWS Certification Exam
  • Amazon Kindle
  • Android phones
  • ASP.Net MVC
  • ASP.NET Web API
  • AWS DevOps Engineer Professional Exam
  • AZ-300: Microsoft Azure Architect Technologies Exam
  • Azure Active Directory
  • Azure App Services
  • Azure Data Factory
  • Azure Logic Apps
  • Azure Mobile Apps
  • Azure Virtual Machine
  • Best Wishes Messages
  • birthday messages for boyfriend
  • Birthday messages For Girlfriend
  • Birthday Wishes
  • Birthday Wishes For Mom
  • Business
  • C# development
  • Cameras
  • Canon
  • Cloud
  • Cloud services
  • digital-cameras
  • Diwali
  • Entrepreneurship
  • eReaders
  • Family Quotes
  • Family Quotes
  • Friendship Quotes
  • Gadgets
  • Games
  • Get Well Soon Messages
  • GIT
  • Good Morning Wishes
  • Google
  • Gratitude Quote
  • Guru Nanak Jayanti
  • Halloween
  • Happiness Quote
  • Happy Diwali Wishes
  • Happy Independence Day Wishes
  • Happy New Year Wishes
  • HTC
  • HTC One
  • HTML
  • I Miss You Messages
  • Inspirational Quotes
  • Inspirational Travel Quotes
  • Interview questions
  • IT/Software development
  • Leadership Quote
  • Life lessons
  • Love Quotes
  • Love shayari
  • Messages
  • Microsoft AI-900 Certification Exam
  • Microsoft AZ-104 Certification Exam
  • Microsoft AZ-204 Certification Exam
  • Microsoft AZ-900 Certification Exam
  • Microsoft Azure
  • Microsoft Azure certifications
  • Microsoft Exam AZ-220
  • Microsoft Excel
  • Microsoft Office
  • Microsoft word
  • Mobile phones
  • Motivational & Inspirational Quotes
  • Nature Quotes
  • Nexus
  • Nikon
  • Pixels
  • PL-200: Microsoft Power Platform Functional Consultant Certification
  • PL-900: Microsoft Power Platform Fundamentals
  • postman
  • Quotes
  • Robin Sharma
  • Samsung Galaxy S5
  • Self improvement quotes
  • Self-Confidence Quote
  • SonarQube
  • Sony PlayStation 4
  • SQL
  • SQL Server
  • Success Quotes
  • Travel Quotes
  • Uncategorized
  • Uplifting Quotes
  • WCF (Windows Communication Foundation)
  • Web development
  • Wishes
  • Wishes for Newborn Baby

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org



Recent Posts

  • Azure Data Factory
  • What is Azure Active Directory?
  • Azure Virtual Machine
  • Azure Logic Apps
  • Azure Mobile Apps

Recent Comments

  • Yosianus on Error while sending json model in POST request to web API service using postman
  • Microsoft AZ-220 Certification Exam Practice Questions – Part 5 Microsoft Exam AZ-220
  • “There is no moment of delight in any pilgrimage like the beginning of it.” – Charles Dudley Warner Quotes
  • Microsoft AZ-900 Certification Exam Practice Questions – 8 Microsoft AZ-900 Certification Exam
  • “The gem cannot be polished without friction, nor man perfected without trials.”– Chinese Proverb Motivational & Inspirational Quotes
  • Famous Buddha Quotes on Life Life lessons
  • ASP.NET MVC: How to show html data from database to front end view Uncategorized
  • AWS DevOps Engineer Professional Exam Practice Questions – 8 AWS DevOps Engineer Professional Exam
  • “Courage doesn’t always roar. Sometimes courage is the quiet voice at the end of the day, saying, “I will try again tomorrow.”– Mary Anne Radmacher Motivational & Inspirational Quotes

Copyright © 2023 Desi banjara.

Powered by PressBook News WordPress theme