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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T07:53:05+00:00 2026-05-11T07:53:05+00:00

We currently have a Java applet that generates a lot of data and uploads

  • 0

We currently have a Java applet that generates a lot of data and uploads it to our servers. One of the upload methods we have is to use an HTTP POST to our server, the contents of which are just the raw data (no multipart encoding or anything).

I’m looking at implementing a Flex app that does the same thing, but I don’t see a way to duplicate that network behavior. All the HTTP-related network classes in Flex seem to work under the assumption that you’re simply making a request. I don’t see a way to actually set the payload of the POST (other than setting a couple query parameters, which wouldn’t work here).

What I’d really like is to be able to initiate an HTTP POST, but then be able to write to the connection like I would a socket. Is this possible without having to write my own HTTP implementation on top of the Socket class? Is there any way to set the payload of an HTTP POST within Flex?

Clarification: Being able to create a data buffer and send that to the server is sufficient (which it looks like is possible). It would be better if I could treat the connection as a socket and send data to it over time, instead of all at once, but that isn’t strictly required.

  • 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. 2026-05-11T07:53:06+00:00Added an answer on May 11, 2026 at 7:53 am

    It sounds like you’re sort of asking two questions. Yes, there is a way to set the payload of an HTTP POST within Flex, and to upload files of any format to your server:

    private function doPost():void {     var yourData:ByteArray = new ByteArray();     var encoder:Base64Encoder = new Base64Encoder();      for (var i:int = 0; i < 10000; i++)         yourData.writeByte(i);      yourData.position = 0;     encoder.encodeBytes(yourData);      var req:URLRequest = new URLRequest('http://yourdomain.com/yourservice.ext');     req.method = URLRequestMethod.POST;      var postData:URLVariables = new URLVariables();     postData.userData = encoder.flush();      req.data = postData;      var loader:URLLoader = new URLLoader();     loader.dataFormat = URLLoaderDataFormat.BINARY;     loader.addEventListener(Event.COMPLETE, loader_complete);     loader.load(req); }  private function loader_complete(event:Event):void {     trace('Upload complete!'); } 

    … but it also sounds like you want to connect, keep the connection open and then write to it arbitrarily ‘like a socket’; if that’s the case, then other than using the Socket classes for that purpose, I don’t believe there’s a built-in mechanism, no. Hope it helps nonetheless!

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

Sidebar

Ask A Question

Stats

  • Questions 118k
  • Answers 118k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I had the same problem. libcurl is really complete. There… May 11, 2026 at 11:31 pm
  • Editorial Team
    Editorial Team added an answer No you don't need to revert, it will be quite… May 11, 2026 at 11:31 pm
  • Editorial Team
    Editorial Team added an answer An anonymous namespace is logically equivalent to namespace _TU_specific_unique_generated_name {… May 11, 2026 at 11:31 pm

Related Questions

I'm part of a team that develops a pretty big Swing Java Applet. Most
Is it feasible to launch an application via a browser / URL? What are
I have a current system which is build as a Windows Application, and does
Before I begin: I have spent a long time on many forums (including Stack

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.