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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T12:06:49+00:00 2026-06-04T12:06:49+00:00

I’m using JSONKit.h, JSONKit.m, ios5.1. and I tried to send data using GET method

  • 0

I’m using JSONKit.h, JSONKit.m, ios5.1.

and I tried to send data using GET method and POST also but my django server gave errors.

Is my code wrong?

here is my codes.

NSString *myid = @"myidddd";
NSString *mypw = @"mypwwww";
NSArray *objects = [NSArray arrayWithObjects:myid,mypw, nil];
NSArray *keys = [NSArray arrayWithObjects:@"id", @"pw", nil];
NSDictionary *dic = [NSDictionary dictionaryWithObjects:objects forKeys:keys];

NSString *jsonInfo = [dic JSONString];
NSData *jsonData = [jsonInfo dataUsingEncoding:NSUTF8StringEncoding];
NSMutableURLRequest* request = [[NSMutableURLRequest alloc] initWithURL:[[NSURL alloc] initWithString:@"http://www.scg.com:8000/post"]];
[request setHTTPMethod:@"GET"];
[request setValue:@"application/json" forHTTPHeaderField:@"Accept"];
[request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
[request setValue:[NSString stringWithFormat:@"%d", [jsonData length]] forHTTPHeaderField:@"Content-Length"];
[request setHTTPBody:jsonData];
[NSURLConnection sendAsynchronousRequest:request queue:[NSOperationQueue mainQueue] completionHandler:^(NSURLResponse *res, NSData *data, NSError *err){
    [self didReceiveData:data];
}];

Errors when my django server received the data,

raceback (most recent call last):
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/wsgiref/handlers.py”, line 86, in run
self.finish_response()
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/wsgiref/handlers.py”, line 127, in finish_response
Traceback (most recent call last):
self.write(data)
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/wsgiref/handlers.py”, line 86, in run
self.finish_response()
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/wsgiref/handlers.py”, line 210, in write
self.send_headers()
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/wsgiref/handlers.py”, line 268, in send_headers
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/wsgiref/handlers.py”, line 127, in finish_response
self.send_preamble()
self.write(data)
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/wsgiref/handlers.py”, line 210, in write
self.send_headers()
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/wsgiref/handlers.py”, line 268, in send_headers
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/wsgiref/handlers.py”, line 192, in send_preamble
self.send_preamble()
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/wsgiref/handlers.py”, line 192, in send_preamble
‘Date: %s\r\n’ % format_date_time(time.time())
Traceback (most recent call last):
‘Date: %s\r\n’ % format_date_time(time.time())
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py”, line 324, in write
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/wsgiref/handlers.py”, line 86, in run
self.flush()
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py”, line 303, in flush
self._sock.sendall(view[write_offset:write_offset+buffer_size])

error: [Errno 32] Broken pipe

Exception happened during processing of request from (‘127.0.0.1’, 54842)
Traceback (most recent call last):
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py”, line 582, in process_request_thread
self.finish_request(request, client_address)
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py”, line 323, in finish_request
self.RequestHandlerClass(request, client_address, self)
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/servers/basehttp.py”, line 139, in init
super(WSGIRequestHandler, self).init(*args, **kwargs)
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py”, line 641, in init
self.finish()
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py”, line 694, in finish
self.wfile.flush()
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py”, line 303, in flush
self._sock.sendall(view[write_offset:write_offset+buffer_size])

error: [Errno 32] Broken pipe

self.finish_response()

File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/wsgiref/handlers.py”, line 127, in finish_response
self.write(data)
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/wsgiref/handlers.py”, line 210, in write
self.send_headers()
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/wsgiref/handlers.py”, line 268, in send_headers
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py”, line 324, in write
self.flush()
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py”, line 303, in flush
self._sock.sendall(view[write_offset:write_offset+buffer_size])

error: [Errno 32] Broken pipe

Exception happened during processing of request from (‘127.0.0.1’, 54843)
Traceback (most recent call last):
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py”, line 582, in process_request_thread
self.finish_request(request, client_address)
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py”, line 323, in finish_request
self.RequestHandlerClass(request, client_address, self)
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/servers/basehttp.py”, line 139, in init
super(WSGIRequestHandler, self).init(*args, **kwargs)
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py”, line 641, in init
self.finish()
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py”, line 694, in finish
self.wfile.flush()
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py”, line 303, in flush
self._sock.sendall(view[write_offset:write_offset+buffer_size])

error: [Errno 32] Broken pipe

self.send_preamble()

File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/wsgiref/handlers.py”, line 192, in send_preamble
‘Date: %s\r\n’ % format_date_time(time.time())
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py”, line 324, in write
self.flush()
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py”, line 303, in flush
self._sock.sendall(view[write_offset:write_offset+buffer_size])

error: [Errno 32] Broken pipe

Exception happened during processing of request from (‘127.0.0.1’, 54844)
Traceback (most recent call last):
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py”, line 582, in process_request_thread
self.finish_request(request, client_address)
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py”, line 323, in finish_request
self.RequestHandlerClass(request, client_address, self)
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/servers/basehttp.py”, line 139, in init
super(WSGIRequestHandler, self).init(*args, **kwargs)
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py”, line 641, in init
self.finish()
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/SocketServer.py”, line 694, in finish
self.wfile.flush()
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py”, line 303, in flush
self._sock.sendall(view[write_offset:write_offset+buffer_size])

error: [Errno 32] Broken pipe

  • 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-04T12:06:50+00:00Added an answer on June 4, 2026 at 12:06 pm

    Self answer.

    The GET method can’t contain data into http body. It is possible only use POST method.

    To send some information with GET method, use extended request URL like:

    "?%@=%@", key, value
    

    Here is sample URL:

    http://www.somedomain.com/?name=username&pw=password
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to construct a data frame in an Rcpp function, but when I
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I have just tried to save a simple *.rtf file with some websites and
I am reading a book about Javascript and jQuery and using one of the
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I have a French site that I want to parse, but am running into

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.