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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T11:42:18+00:00 2026-05-31T11:42:18+00:00

I’m facing an odd behavior. I use the following code to send an HTTP

  • 0

I’m facing an odd behavior. I use the following code to send an HTTP
request to a server using a POST method

[[RKClient sharedClient] post:[NSString stringWithFormat:@"api"]
                           params:aDict
                         delegate:self];

The dictionary that hold the values is as followed :

NSDictionary *comment = [NSDictionary dictionaryWithObjects:[NSArray
arrayWithObjects:@"wallcomment", [self.wall
valueForKey:@"wallMessageId"], [self.textView text], nil]
                                                        forKeys:
[NSArray arrayWithObjects:@"a01call", @"a01wall_message_id",
@"a01comment", nil]];

When [self.textView text] is filled in with French word with accent
the server receive with wrong encoding : “Test @ vérification
caractères spéciaux”

I do not manipulate the textview text before posting so encoding is also UTF8.

When i check the POST header, the content-type is not having the encoding type. I tried to add it with the following method but it’s not added :

- (void)setValue:(NSString *)value forHTTPHeaderField:(NSString *)header

Any special method or property i haven’t seen in the documentation ?

I’m using the RestKit 0.9.3

  • 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-31T11:42:20+00:00Added an answer on May 31, 2026 at 11:42 am

    Do this:

    [[RKObjectManager sharedManager] loadObjectsAtResourcePath:@"api" delegate:self block:^(RKObjectLoader *loader) {
        [loader setAdditionalHTTPHeaders:[NSDictionary dictionaryWithObjectsAndKeys:@"application/x-www-form-urlencoded;charset=UTF-8", @"Content-Type", nil]];
    }];
    

    Don’t forget to add other headers if you need any.

    One additional thing that I noticed while going through RestKit code, RKObjectManager line 222:

    loader.method = RKRequestMethodGET;
    

    So don’t be surprised you the method is GET, not POST. If you really need POST (which I think you don’t), then change the method in the block.

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

Sidebar

Related Questions

I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I am trying to understand how to use SyndicationItem to display feed which is
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the
I have this code to decode numeric html entities to the UTF8 equivalent character.
I want use html5's new tag to play a wav file (currently only supported
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this

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.