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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T11:52:24+00:00 2026-06-08T11:52:24+00:00

Lately I’ve been going hard with Python and Flask to expose a RESTful API

  • 0

Lately I’ve been going hard with Python and Flask to expose a RESTful API for our end users. At this time, it’s only GET methods, no POSTing… until now.

One interesting request that was made to me was to figure out if it was possible to take a GET request, which outputs to JSON and redirects it back into another web service as a POST request.

Think of it like copying data through a web service, if that makes any sense. Or maybe like “GET-redirect data-POST”.

To further drive the point home, I have a simple GET request:

urllib2.Request("http://localhost:5000/request/security/773/20110101")

The output is JSON and I want to take that data and POST it back to:

http://localhost:5000/submit/transaction/773/20110101

Assuming data mapping is one to one (which it is). Is there a way to do that as one call on the server side? Is that even a smart thing to do? Just looking for thoughts, ideas and comments.

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

    Seems simple enough. Why not just do the post from your request/security handler?

    def request_security_handler():
        ....
        data = "Data"
        urllib2.Request("/submit/transaction/773/20110101", data)
        return data
    

    If the posting is an optional thing, you could have done a get like:

    urllib2.Request("http://localhost:5000/request/security/773/20110101?RepostResultTo=/submit/transaction/773/20110101")
    

    And then:

    def request_security_handler(RepostResultTo):
        ....
        data = "Data"
        urllib2.Request(RepostResultTo, data)
        return data
    

    In any case for this to be a single round-trip with the server, the server is going to have to do the POST to itself. The client won’t be able to get the results from the GET and then do a POST with 2 round-trips.

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

Sidebar

Related Questions

Lately, we've been seeing exceptions like this in our .NET (.asmx) webservices: System.Web.Services.Protocols.SoapException: Server
Lately I was working on changing the deployment of our in-house python modules. Those
Lately, I've been going through a pretty weird phase. I feel the need to
Lately I have been working on OS X. Things were going pretty peachy for
Lately I have been trying my hands on Eclipse IDE for java development. I
Lately I've been favoring using named pipes (option --enable-named-pipes) in MySQL running on windows,
Lately, I'v been struggling with an annoying situation on ASP.NET MVC. Here's the story
Lately I've been thinking a lot about building a website/blog/community oriented site. However I
Lately I've been job hunting, and for the most part, they would ask me
Lately I have been experiencing Eclipse Galileo (3.5) slowing down under Java 1.5b12 OR

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.