Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6936411
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T12:13:49+00:00 2026-05-27T12:13:49+00:00

I found the MVC API Action filter which should automatically check if the request

  • 0

I found the MVC API Action filter which should automatically check if the request demands a json response and if so automatically serialize in json the model i was sending to the view, right ?!

http://mvcapi.codeplex.com/

I found many examples but the thing is they all assume that the request will be sent by an Ajax call in which i can clearly specify it’s a json request.

I want to call the action directly from my browser but i’m not without any specification it simply returns the view

How do i specify in the url that i’m requesting a json response?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T12:13:50+00:00Added an answer on May 27, 2026 at 12:13 pm

    I know of the library that you write of, but haven’t used it. I shied away from using it when I saw that it never seems to have made it out of Beta on Codeplex and hasn’t been updated in over a year.

    That aside, in the methodology being used, the URL doesn’t determine the data type coming back, the Http Accept Headers are what does it. This is a more RESTful approach to returning data.

    You’ll note on the link that you provided in the Request section that

    Accept: application/json, text/javascript, */*
    

    application/json is what tells the service to return json. You may find other examples on the web that say text/json instead, and they should work also, but application/json is the correct standard.

    If you’re using jQuery, you can use $.ajax and specify dataType: 'json' or just use the $.getJson method directly.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm building an api using ASP.NET MVC 3. When a controller action is not
Url.Action found in MVC is member of what classes? VS2008 cannot find it and
This is my code: import play.api.mvc._ import play.api.libs.json._ import play.api.libs.json.Json._ import play.api.libs.json.Writes._ class BaseController
I just found the MVC was initially proposed in 88 [ here is the
I found What are mvp and mvc and what is the difference but it
I have found jQuery to be a great tool to simplify my MVC Views.
Most of the ASP.NET MVC paging solutions I have found by googling look like
Using a technique I found in one of the recent ASP.NET MVC books, I
I am learning ASP.NET MVC now a days and I have found that most
I was reading this page and I found the following statement: MVC in Java

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.