Skip to content

Desi banjara

  • Microsoft AZ-104 Certification Exam Practice Questions Microsoft AZ-104 Certification Exam
  • Microsoft AZ-220 Certification Exam Practice Questions – Part 1 Microsoft Azure certifications
  • Interview question: What is the purpose of “is” operator in C#? C# development
  • Specs comparison – Nikon D5500 vs Nikon D5600 Cameras
  • Microsoft AI-900 Certification Exam Practice Questions Microsoft AI-900 Certification Exam
  • “To have darkness behind me, in front of me a bright sky, flickering lights on the water and to feel it on the stony face of the southern sun.”– Julia Hartwig Motivational & Inspirational Quotes
  • “People are like stained-glass windows. They sparkle and shine when the sun is out, but when the darkness sets in their true beauty is revealed only if there is light from within.” Elisabeth Kübler-Ross Motivational & Inspirational Quotes
  • I feel embarrassed today because there is no gift I can buy that matches the gift of life you have given to me. Here’s a birthday wish to a mother who never gave up, from a daughter who is forever grateful for the support. Birthday Wishes For Mom

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

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

  • What is ASP.NET Web API ? ASP.NET Web API
  • Asp.Net WebApi Interview Questions – Cont. ASP.NET Web API
  • Asp.Net WebApi Interview Questions ASP.NET Web API
  • How to enable cors in WebApi to handle request from different subdomains? ASP.NET Web API
  • WCF (Windows Communication Foundation) 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

  • 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
  • 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
  • Uncategorised
  • Uplifting Quotes
  • WCF (Windows Communication Foundation)
  • Web development
  • Wishes
  • Wishes for Newborn Baby

Meta

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



Recent Posts

  • PL-200: Microsoft Power Platform Functional Consultant Certification – Exam Practice Questions
  • SonarQube – Static code analysis
  • Microsoft PL-900 Certification Exam Practice Questions – 2
  • Microsoft AZ-204 Certification Exam Practice Questions – 1
  • AWS DevOps Engineer Professional Exam Practice Questions – 14

Recent Comments

  • Yosianus on Error while sending json model in POST request to web API service using postman
  • I wish you a year loaded with the most amazing moments to cherish. Birthday Wishes
  • “It is only in our darkest hours that we may discover the true strength of the brilliant light within ourselves that can never, ever, be dimmed.”– Doe Zantamata Motivational & Inspirational Quotes
  • Microsoft AZ-220 Certification Exam Practice Questions – Part 1 Microsoft Azure certifications
  • May this birthday bring you lots of joy, happiness and success. Wishing you a wonderful birthday. Birthday Wishes
  • This birthday, let’s raise a toast to all things wise that you never did. Birthday Wishes
  • Happy Rakshabandhan Wishes, Greetings Best Wishes Messages
  • Interview question: What are the namespaces in C#.NET? C# development
  • How to turn off swipe screenshot feature on Samsung Galaxy S5 Android phones

Copyright © 2022 Desi banjara.

Powered by PressBook News WordPress theme