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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T01:58:43+00:00 2026-06-05T01:58:43+00:00

From an android app I’m POSTing data to an Heroku django solution. But django

  • 0

From an android app I’m POSTing data to an Heroku django solution.

But django app don’t receive any data.

Testing with curl (insteat android app) I take this log:

dani@heroku-test:~/tmp$ curl -vd '[{"lat ____some data ___ adf"}]'  \
                        http://myApp.heroku.com/x/receive_JSON/ 

* About to connect() to myApp.heroku.com port 80 (#0)
*   Trying 107.21.106.77... connected
> POST /x/receive_JSON/ HTTP/1.1
> User-Agent: curl/7.22.0 (i686-pc-linux-gnu) 
 libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: myApp.heroku.com
> Accept: */*
> Content-Length: 296                 <---- OK!!!
> Content-Type: application/x-www-form-urlencoded
> 
* upload completely sent off: 296out of 296 bytes
< HTTP/1.1 301 Moved Permanently
< Server: nginx
< Date: Sun, 03 Jun 2012 22:15:13 GMT
< Connection: keep-alive
< Location: http://myApp.herokuapp.com/x/receive_JSON/
< Content-Length: 0                     <-----KO!!!!!!!!!!!!!!!!!!!!!!!!!!
< 
* Connection #0 to host myApp.heroku.com left intact
* Closing connection #0

It seems that is a problem with redirect, it seems that curl (android) don’t send POST data after redirect operation.

How can I do to fix this behavior or what may be a workaround?

My django view to test received data:

@csrf_exempt    
def receive_JSON(request ):

    return HttpResponse("Rebut: {0}".format( len( request.raw_post_data ) ) )

To send data I use How to send a JSON object over Request with Android? (also httpost.setHeader(“Content-type”, “application/json”); )

Notice: this works fine in local with runserver.

  • 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-05T01:58:45+00:00Added an answer on June 5, 2026 at 1:58 am

    Solved change url to righ location:

    http://myApp.herokuapp.com
    

    instead

    http://myApp.heroku.com
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have android app . i should pass the data from android to web
I am using the following code to post data from an android app to
So I'm writing an android app that needs to grab book price data from
I am trying to send data from an Android app to a PHP file
I'm trying to send data from my Android app to my PC over TCP.
I'm sending files from an android app to a asp.net webform using multipart/form-data as
Here is my code to send the data from android app to php app
I am trying to write an android app to read and write data from
I have a php web service that takes the request from android/iphone app and
I am using oracle db and weblogic as web server. From my android app

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.