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 3212212
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T14:48:54+00:00 2026-05-17T14:48:54+00:00

When requesting an object for example using REST, is it possible to get the

  • 0

When requesting an object for example using REST, is it possible to get the response in json and xml format or do I have to create UriTemplates that are something like:

[WebInvoke(UriTemplate="&format=json?user/{id}", ResponseFormat=WebMessageFormat.Json)]

[WebInvoke(UriTemplate="&format=xml?user/{id}", ResponseFormat=WebMessageFormat.Xml)]

The reason I ask is because I may need one format returned for an app on an android phone for example and another type returned for an app on a laptop.

Also, Can the methods have the same name such as Register or do I have to have one called:

RegisterJSON(User user) and another called RegisterXML(User user)

  • 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-17T14:48:54+00:00Added an answer on May 17, 2026 at 2:48 pm

    It is available out of the box in WCF 4 (.NET 4.0). Check AutomaticFormatSelectionEnabled property of WebHttpBehavior. You can also set this property from configuration. I showed the example here.

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

Sidebar

Related Questions

If I have a resource that a requesting client doesn't have access to but
I have a stdClass object created from json_decode that won't return the right number
I often have customer requesting changing properties, like the version history setting on all
There are many techniques to enforce strong passwords on website: Requesting that passwords pass
I am working on an ASP.NET page that we, in code impersonate the requesting
We have a custom written on-line job application... application. HR is requesting a skill
What's the latency to GET an object from S3 from an EC2 Instance. For
How is it possible to simply access to get and post attributes in lift
When requesting hardware for a WebLogic server, what hardware would best improve its performance?
I need code in Perl for requesting and parsing ATOM and RSS feeds. Is

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.