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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T11:57:23+00:00 2026-06-07T11:57:23+00:00

We have a HTTP RPC api for which all of the arguments are to

  • 0

We have a HTTP RPC api for which all of the arguments are to be encoded using JSON. This works, but it actually does not feel very elegant to have a mix of MIME x-www-form-urlencoding and JSON in the body of the http post. I.e. the body might look like this:

POST /my/rpc/api/endpoint

foo={"x":123,"y":true}&bar=[1,2,3,4,5,6,7]

I have seen services that don’t use MIME at all and go for full json encoding. E.g:

POST /my/rpc/api/endpoint

{"foo":{"x":123,"y":true},"bar":[1,2,3,4,5,6,7]}

I think the latter solution looks much cleaner, however I am not quite sure if this is a violation of HTTP conventions and which implications this would have. Is this something to avoid? Would this make it harder to implement clients for example?

  • 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-07T11:57:25+00:00Added an answer on June 7, 2026 at 11:57 am

    There’s nothing wrong with using JSON in the POST payload. What’s important is to use the proper internet media type, thus “application/json”, instead of “application/x-www-form-urlencoded”.

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

Sidebar

Related Questions

We have HTTP webservices that are RPC. They return XML representing the object the
This is JavaScript regex. regex = /(http:\/\/[^\s]*)/g; text = I have http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd and I
I have an HTTP Module that I use to clean up the JSON returned
I have Text( http://www.mywebsite.com ) in a view, in which i need to provide
I'm building an API that will use JSON. The primary use for this API
I'm using XML-RPC.NET (from http://www.xml-rpc.net/ ) and the HttpListener method of listening for XML-RPC
We have a webservice running on Websphere 6.1 using the IBM JAX-RPC based webservices.
Hello i have somme problems to write a simple XML-RPC client in PHP. This
So I have a simple xml-rpc server (xml over http) provided to me to
Hi quick question about Jayrock... I have a Jayrock JSON-RPC web service that generally

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.