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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T14:11:57+00:00 2026-05-23T14:11:57+00:00

Simplified code example: http://pastebin.com/9ZQxSXi9 Hi I wanted to experiment with the restlet 2.0 library

  • 0

Simplified code example: http://pastebin.com/9ZQxSXi9

Hi

I wanted to experiment with the restlet 2.0 library and the gpodder webservice but somehow i reached a point where I can’t see the wood for the trees.
The service in the example requires HTTP authentication and to post some JSON content to a URL.
Nothing that complicated but somehow even though the debug view claims the request object to contain the necessary content the RESTful webservice’s response leads me to believe the HTTP header of the request was missing the content.

Any ideas on what’s the reason? Thanks in advance.

  • 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-23T14:11:57+00:00Added an answer on May 23, 2026 at 2:11 pm

    The problem is that that none of the implementation of WriterRepresentation I’ve seen (JsonRepresentation, JacksonRepresentation, XStreamRepresentation) set the size of the representation when an object is passed. So if you create a new JacksonRepresentation(map) the size is not calculated.

    You have to compute manually the length of the map content and calling Representation.setSize().
    Or, as I did, use a

    new JsonRepresentation(” a json string… “);

    This constructor is able to compute the size, of course, that’s the string length, so the proper content-length header is set and everything works smooth.

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

Sidebar

Related Questions

I got this code for a parser from this link. http://www.warriorpoint.com/blog/2009/07/19/android-simplified-source-code-for-parsing-and-working-with-xml-data-and-web-services-in-android/ I am getting
I'm pretty sure I'm doing something wrong, but I've simplified my example as much
Here is a simplified code example of what I'm trying to do: public class
[EDIT: Simplified question and code example I hope!] Hi. I need a bit of
A co-worker just created the following construction in C# (the example code is simplified).
In a code review, I stumbled over this (simplified) code fragment to unregister an
I have a fairly simple Linq query (simplified code): dim x = From Product
This question is partly about delegates, and partly about generics. Given the simplified code:
When using this code (simplified for asking): var rows1 = (from t1 in db.TABLE1
Imagine I have the following code (simplified regarding my real context of course): <div

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.