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

  • Home
  • SEARCH
  • 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 8097425
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T21:45:31+00:00 2026-06-05T21:45:31+00:00

If i implement a REST based WCF service, then as a Request i will

  • 0

If i implement a REST based WCF service, then as a Request i will just use my http url say fr example http://www.example.com/createuser/user1

Now, the data i need to post to the server would go as part of HttpRequest object itslef, is this correct if i am using post method?

Also as part of response what do i get, do i get just JSON which is what i want from response or an HttpResponse object, which has json as part of it’s body?

  • 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-06-05T21:45:32+00:00Added an answer on June 5, 2026 at 9:45 pm

    First of all, your URL still seems as RPC style. The method name smells in the URL(createruser/user1).

    Instead if your user as resource, then the collection of Users could be shown as following
    http://www.example.com/users (with HTTP get) which would give you all the users.

    For a perticular user
    http://www.example.com/Users/User_Id with HTTP get Method

    If you want to create a perticular user, then
    http://www.example.com/Users with HTTP Post.

    Now, HTTP Post sends data in form collection, so the information to create a user would be sent as form data.

    As for respone, the server can send you multiple form of respone. The client has to tell in accept headers what kind of Representation he would like for a perticular resource(it could be sepcified in url also like the twitter apis). The server, then can take the client request in consideration and server the response in the content type. There are other media types also other than JSON, XML and plain text

    As for your HTTResponse object, it would depend what kind of technology you are using to make a requeset. If you are using C#, then you would get a HTTPResponse object. If Javascript then you would get response, embedded inside XMLHttpRequest body(either by responseXML or responseText)

    EDIT
    You could use Rest StarterKit for WCF or even you could use WebAPI.
    In WCF, while declaring your operation contract, you would annotate your method with following attributes

    [OperationContract]
    [WebInvoke(Method="GET", UriTemplate="/GetData", 
               ResponseFormat=WebMessageFormat.Json)]
    string GetData();
    

    What does it tells

    Method = “GET” http method used for this resource

    UriTemplate = for mapping the method to URL. A perticular URL needs a perticular method to be invoked.

    ResponseFormat = Server to return the response in this format.

    You could find more details over here and here

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

Sidebar

Related Questions

I've been working lately on my own WCF AtomPub service (based on the example
I am writing an application that is consuming an in-house WCF-based REST service and
I am trying to create a WCF client that operates with an http rest
I have a REST web service which exposes 2 methods- [POST method] Client will
What is best method to implement ReST based Web Services in Java. Should I
I intend to implement a pure Akka powered REST based Web API. I am
I am attempting to implement a reverse proxy using the RequestInterceptor from WCF REST
Have to say I wish I could implement server-side persistence (i.e., session-based and/or database-based
I've implemented a REST-based API (using Tonic, FWIW) so I have a central dispatch.php
We've to implement a REST API to access some features of our current server,

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.