How does URLRequest communicate with a server?

Hi
I've been using URLRequest in my AIR desktop app to deal with server communications. I understand how to make it work, but I'm curious how it works under the hood - ie what header info etc is sent?
I'm setting up an api for another developer to communicate with my server using a non-Flash app, and I'm having difficulty understanding what he needs, as I am used to having my php script first just look for an $_POST variables to deal with - so I just gave him a list of what POST values to send. But he needs more info to send data - here's what he's asking...
url including command type
headers
blank line
body (json string)
eg
https://www.mysite.com POST /api/account.php?command=login HTTP/1.1
Content-Type: application/json
Connection: close
{"pass":"superhardpass","token":"","appID":"myApp","user":"billClinton","ver":"2.01","Coll ection_ID":"1"}
He's asking me...
"what i need is a list of:
url string
list of header values you expect
body string"
What does Flash usually send?
Thanks guys
[Moved here from Flash Pro forums]
Message was edited by: sinious

It sounds like he has only worked with RESTful interfaces and doesn't remember when the world mostly worked with GET and POST. RESTful interfaces also support PUT, DELETE, and I think some other thing I forget at the moment. Mainly, he just needs to educate himself about how basic form/html sends work and have worked since like the 90's, but here are some things that might help you and him speak to each other.
Flash isn't really able to use anything but GET and POST, so basically it sounds like you just need to tell him "POST" for command type.
Flash can't send headers, so those aren't applicable. If he wants to use an encoding type, he can send "multipart/form-data", though I don't think the back-end cares one way or another about that.
Tell him to send just individual POST variables, and that you're not looking for JSON or anything fancy like that.
If you're not trying to leverage existing back-end code and want to meet him halfway, do a web search on writing RESTful web services in your language of choice. But honestly this is basic stuff he should have learned BEFORE he learned to just call web services. You may also find that the Dreamweaver forum can give you better answers about how to learn to write web services if that's what you want to do.

Similar Messages

  • Using my apple ID and password on Mobile Me, I get the message  "Verification Failed"  .  Could not communicate with the server.  What am I doing wrong?

    Using my Apple ID and password on Mobile Me, I get the message "Verification Failed".  Could not communicate with the server"  What am I doing wrong?

    There is a MobileMe forum.  You might have better luck their.

  • How to communicate with a server ?

    Hello.
    I'm an intern trying to find a RIA client to use with a Java application server. The server provides two ways to access data :
    - a HTTP servlet that deals with XML
    - a web service
    I can't find information about how to communicate with a server using JavaFX 2, so can you try to explain it to me ?
    I'm sorry if what I ask is stupid, but I'm not very familiar with these things, I'm just a student.
    Thank you.

    Hi,
    communicate with a server is not JavaFX speciffic. You can use any "Java way" to access web-services or http requests. Try Axis2, it creates you the client API from the WSDL (the webservices on your server should provide the WSDL), than you can use this created client API to access the web-service in your JavaFX application. (see: http://people.apache.org/~ruchithf/hw-axis2/). You should be aware that by default you are working on one Application Thread (JavaFX as well as Swing and SWT), so when your first poc. is running you should use the javafx concurrent api, to create non blocking requests (http://docs.oracle.com/javafx/2/threads/jfxpub-threads.htm).
    Andy

  • How outlook communicate with exchnage server 2013/2010/2007

    when  i am creating a outlook profile for any user to access the mail box from exchange server. on that time how outlook communicate with exchange server.
    Abp

    Hi paul440,
    Thank you for your question.
    If we have configured autodiscovery correctly, outlook will connect Exchange CAS server by autodiscovery, autodiscovery will direct outlook to connect correct CAS server by user’s mailbox location. For Example, if the user mailbox located on Exchange 2010,
    outlook will connect Exchange 2010 CAS. if the user mailbox located on Exchange 2013, outlook will connect Exchange 2013 CAS.
     We could refer to the following link:
    https://technet.microsoft.com/en-us/library/bb310763(v=exchg.141).aspx
    If there are any questions regarding this issue, please be free to let me know. 
    Best Regard,
    Jim

  • My facebook setting keeps saying "Error Signing In" "could not communicate with the server." How do I fix this?

    I have been trying to fix my facebook setting but I keep getting an error message after inputting my password. "could not communicate with the server" keeps popping up. [DELETE ACCOUNT] doesn't work either. It doesn't delete my facebook account at all. What else can I do?

    THIS HAS WORKED
    Apple Support Communities
    Re: IOS 7 Apple Settings Facebook Error
    created by Pegboarder in Using iPad - View the full discussion
    Go into settings/privacy/Facebook and disable the button.
    Open your Facebook app and login.
    Once logged in go back to that button and enable.
    You may have to re-enter your password but the error will be gone.
    Good luck.
    Did this help? Go to the message, sign in, and reply
    Start a new discussion in the same community
    You are receiving this email from Apple Support Communities. You can change your email preferences in your Apple Support Communities Profile.
    © 2013 Apple Inc. 1 Infinite Loop, MS 303-3DM, Cupertino, CA 95014.
    All Rights Reserved | Privacy Policy | Apple Support Communities Terms of Use | Apple Support

  • AIR doesn't communicate with my server - PHP issue

    Hello,
    So I have made an AIR application where the file communicates with a PHP file in order to display data.
    I have WAMP installed on my computer, and the application works when I test locally using WAMP but if I upload the php on an online server(I tried on two of my servers) and run the AIR application it seems that it doesn't communicate with the server so no data are displayed.
    var url:URLRequest = new URLRequest("http://www.test.com/test.php")
    This is how I call for the php on AS3, like shown above.
    Any suggestions?
    The php file gives no errors when I browse it online so, I suppose there something else going on?

    There are no errors, on either the php files stored online neither the flash swf.
    The only file scalled from an online server are the PHP.
    I suppose I don't need to pack these PHP when publishing the air file, since they need to be called from an online server?
    Very tricky since there are no errors, I would appreciate any help since this is an urgent project.
    //EDIT:
    So I just removed the http:// from the urlrequest to the site that the PHP is stored and I get this IO error:
    Error #2044: Unhandled ioError:. text=Error #2032: Stream Error. URL: app:/test.com/test.php
    at my_fla::test_1/setPHP()[my_fla.test_1::frame1:38]
    Notice the app:/ ? why is it there? Could it be the issue? I am not sure, but if you link to a local file, like "test.php" it works, but when adding a URL it doesn't...

  • Error: "Verification Failed" Could not communicate with the server.

    "Verification Failed" Could not communicate with the server.
    I get this message every time I go to Icloud in setting menu.
    also my contact are not in sync (empty on Ipad)
    What does this message mean, and how do I solve it.
    Everything else works (Autodesk Draw also works with Icloud and it works fine)
    Mail ok
    Downloading from appstore ok (also after password)
    Please provide me with a solution due to this problem I can't get my contacts on my new ipad (at least that is what I think)

    Ok I got it working... the Ipad stores your password at different locations. So changing it once does not do the job. I thought the Ipad had the Single Sign On function for the apple password.
    So make sure that you not only change your password in "the shop" but also in the setting menu (general) and icloud menu.
    this helped for me, I had to let go the Single Sign On thought first....

  • A network error occurred while trying to communicate with the server.

    Hello All,
    I am getting some new error messages when opening the server app on my Mac Mini server running OS X 10.8.2 and Server 2.2.1. First I get a message that says "A network error occurred while trying to communicate with the server." and then after trying to open some of the service panes, I get additional errors that say "Multiple errors occurred on the server while processing commands." The services don't load and I just see "Error Reading Settings" in the server app.
    I started to get these errors when I added a new website to the server. All the services are working fine but I cannot access them in the server app.
    In console I'm seeing these errors when I try to access various services:
    2/24/13 8:02:12.692 PM Server[956]: Error: The server '10.0.1.150' reported an error while processing a command of type: 'readSettings' in plug-in: 'servermgr_dns'. Error: Error Domain=XSActionErrorDomain Code=499 "The certificate for this server is invalid. You might be connecting to a server that is pretending to be “10.0.1.150” which could put your confidential information at risk." UserInfo=0x7f8c4003a760 {NSLocalizedDescription=The certificate for this server is invalid. You might be connecting to a server that is pretending to be “10.0.1.150” which could put your confidential information at risk., originalError=Error Domain=NSURLErrorDomain Code=-1202 "The certificate for this server is invalid. You might be connecting to a server that is pretending to be “10.0.1.150” which could put your confidential information at risk." UserInfo=0x7f8c3f547db0 {NSURLErrorFailingURLPeerTrustErrorKey=<SecTrust 0x7f8c40599080 [0x7fff7711ffd0]>, NSLocalizedRecoverySuggestion=Would you like to connect to the server anyway?, NSUnderlyingError=0x7f8c3d58c0b0 "The certificate for this server is invalid. You might be connecting to a server that is pretending to be “10.0.1.150” which could put your confidential information at risk.", NSErrorPeerCertificateChainKey=(
        "<SecCertificate 0x7f8c3f6747e0 [0x7fff7711ffd0]>"
    ), NSLocalizedDescription=The certificate for this server is invalid. You might be connecting to a server that is pretending to be “10.0.1.150” which could put your confidential information at risk., NSErrorFailingURLKey=https://10.0.1.150:311/commands/servermgr_dns, NSErrorFailingURLStringKey=https://10.0.1.150:311/commands/servermgr_dns, NSErrorClientCertificateStateKey=0}}
    I have already restarted the server and used terminal to stop and start postgres. Any more thoughts on how to repair this?

    Just as I had suspected, the whole GUI crashed because of certificate problems. After two and a half hours with enterprise support, it turns out the com.apple.servermgrd certificate in the server keychain had become corrupt.
    We determined this by typing https://127.0.0.1:311 into Safari and we could see all the server modules and interact with them through the web interface. All the services were working properly as well so we knew that it was just the Server.app GUI that simply couldn't read settings that was causing the problem.
    So, first we closed the server app. Went into /var/servermgrd and deleted all the files from this folder. Then, in Keychain, deleted the com.apple.servermgrd certificate. Did a search for com.apple.servermgrd in Keychain and deleted everything else that came up for it.
    Then restarted the server. Now the server app was able to properly connect to the services in the background and read them properly. This was the jist of the troubleshooting that solved the problem. It also seems like DNS is causing problems because that is the only service that will not read right but is functioning properly in the background.
    I will post an update once Apple figures out what is wrong with DNS. Hope this helps anybody else having these problems.

  • How can I communicate with other applications from my Java application?

    Hello,
    I need help about how can i communicate with other application(say textpad.exe/wordpad.exe/MS word.exe) from my Java program.
    More precisely, I need to know how i can get the current position of the cursor whether it is in any .txt/.doc files, then I may write some text in my java application and click a button and then my program will append the line(string) in that position of the file which is running under another appliction(Notepade.exe/MSword.exe).
    Please provide me some help.

    I may be wrong (and anyone, please correct me if so), but Java may not be the best tool for something such as this. I envision that you'd have to make some OS calls such as calls to the user32.dll, and while this can be done through the JNI, you'd still have to have a C or C++ program doing the dirty work.

  • The crawler could not communicate with the server on SharePoint 2010

    Dear Friends,
      we have two tier farm application and web is running in one server , and other one is database server, search crawling is not working  ,My search service application log giving these below errors ,  Can you please suggest me how to fix these
    errors and how to make the search crawling with out errors.This is very urgent friends, because I have these issues on production server. kindly help me to fix these issues as soon as possible.
    The crawler could not communicate with the server. Check that the server is available and that the firewall access is configured correctly. If the repository was temporarily unavailable, an incremental crawl will fix this error.
    An unrecognized HTTP response was received when attempting to crawl this item. Verify whether the item can be accessed using your browser.
    Please see the recent crawl history below, it is listed 124,062 24 errors.
    Crawl started
    Crawl completed
    Crawl duration
    Type
    Successes
    Warnings
    Errors
    Top Level Errors
    Deletes
    Not Modified
    Security Updates
    10/19/2014 11:55 PM
    10/20/2014 12:10 AM
    00:15:27
    Incremental
    0
    0
    124,062
    24
    0
    1
    0
    10/19/2014 10:55 PM
    10/19/2014 11:11 PM
    00:16:26
    Full
    1
    0
    124,062
    24
    valmiki

    thanks gain noddy, I found the actual problem now . It is crawling the site collection . but is not crawling the sub site. How to include sub site  to crawl  , I found this solution in Google , one suggested to do this but did not work out. 
    Can you please let me know how to include sub site to crawl its contents .
    The solution to this is frustratingly simple...
    At the root of the site, go to Site Actions >> Site Settings and choose Search and Offline Availability under Site Administration.
    Set the page indexing behavior to “Always index all Web Parts on this site”.
    Save and run a full crawl.
    valmiki

  • Outboung Campaing: Error Unable to communicate with Enterprise Server. outbound Option not available

    Hi everyone,
    I'm running UCCX 8.01 + CUCM 7.1+ Cisco 7942 just for learning purpose. After creating the Outbound Campaign and imported the Contact List the call is received by the agent (call is state is received as Offering) but after press the Accept, Reject or any othe action button is received the error:
    Error Unable to communicate with Enterprise Server. outbound Option not available (attached to post).
    What does this mean?
    Regards
    Please rate all useful posts
    Favor calificar todos las respuestas útiles.
    LinkedIn Profile: do.linkedin.com/in/leosalcie
    MDGDP, CCNA, CCNA Voice, CCNP Voice Certified       

    Any idea?
    Please rate all useful posts
    Favor calificar todos las respuestas útiles.
    LinkedIn Profile: do.linkedin.com/in/leosalcie
    MDGDP, CCNA, CCNA Voice, CCNP Voice Certified

  • Custom Item updating throws Unable to Communicate with the server Error.

    Hi Team,
       I am trying to Implement Form based authentication in SharePoint 2013. When trying to update membership list (A Custom List) item it throws "Unable to Communicate with the Server" error. As shown in below image.
    Please let  me know how to resolve this issue.
    Thanks in advance.

    Hi Murali,
    I'm having a similiar problem with one of my customers. We haven't been able to resolve it but we have found a way around it, I'd like to do more testing but my customer justs wants to get on with it now that we have a workaround. Logging a call with Microsoft
    can be expensive, most businesses have a finite amount of support hours so you really have to do your homework before you starting chewing those hours up.
    Problem Description:
    Customer created a custom list with two calculated columns and various choice, string and multi-string columns. Customer was attempting to copy and paste 128 rows of data into each column from a spreadsheet. The first (title) column successfully pasted
    128 values.
    Subsequent columns would paste the values but not allow the values to be committed as every row displayed the "Unable to Communicate with the Server" message, preventing the list from being saved.
    Workaround:
    The problem appears to be related to the number of items the customer is trying to paste during each operation and the relationship this has with the calculated columns. We found that when we pasted 70 or less items in one operation we did not receive the
    error. I attempted pasting 128 rows of data into a seperate list with the same columns excluding the calculated columns, and was successfully able to paste all 128 rows.
    For the problem list I suggested to the customer to copy the formula's from the calculated columns, delete these columns and then trying pasting again, he didn't like the idea as he's happy to paste in 50% chunks. Based on the fact I was able to paste
    without any problems on a list without calculated columns I would suggest it's related.
    So my questions for you are:
    Are you trying to paste/add multiple values at once?
    Do you have any special column types, i.e. calculated or lookup columns?
    What columns do you have in your list?
    Have you tried adding the entries in using form entry instead of grid entry?
    Unforunately I don't know how generic this error message is, there is absolutely nothing in my ULS logs or event viewer. If this error is specific to submitting data to a list in grid view it would make it easier to diagnose, but if the error is generic
    in nature your problem could be as obscure as the FBA configuration.
    I hope this information helps you, I will try and do some more testing.

  • I am using ipad mini ... I was unable to access facebook since long time... Its shows error could not communicate with the server.... I had install it but result was same. Can anyone help me???

    I am using ipad mini ... I was unable to access facebook since long time... Its shows error could not communicate with the server.... I had install it but result was same. Can anyone help me???

    first off , from the wired computer access the router using http://192.168.1.1 .. check the firmware version .. go to www.linksys.com/download and check the latest firmware available...if the router does not have the latest firmware , upgrade it first. .. after the firmware upgrade , reset and reconfigure the router
    if the router has the latest firmware , then reset the router for 30 seconds .. do a power cycle...access the router ui ..default password is admin..click on the "mac add clone" subtab , enable it and click clone....save the settings and do a power cycle..ensure that the wired computer is online
    on the router web ui , click on the wireless tab ..change the ssid - any non-linksys name , channel - 11 , security mode - wpa , beacon interval - 50 , fragmentation threshold - 2306 , RTS threshold - 2307 ..
    let me know if this helps you..

  • How does IGS work with WebDynpro?

    Hello,
    I want to test Web Dynpro tutorial with geo services (GeoMap). I read that I need the full version of the IGS and a non-SAP GIS server.
    I downloaded the IGS and will install it. But what is about the non-SAP GIS server. Where can I find it? How does IGS access the GIS server?
    Thanks for your help.
    Marita

    By default, WAAS preserves the DSCP marking on intercepted packets.  There is a configuration option to set/override the DSCP value at the global (device), application, and classifier levels.  Currently WAAS provides marking only.  There is no action taken by WAAS based on the DSCP value.
    Regards,
    Zach

  • Communicate with SOAP server form forms6i

    How can I communicate with an external (.NET) SOAP server in Forms6i?

    We are running forms 6i client-server. I have created client stub class for web service and imported into the form. But the class could not get instatiated at run time. I realized that the soapHTTPconnection package is being imported in the stub class. There is no such package in the oracle forms home. Other packages that the class imports are java.net, org.apache, java.util. So the oracle forms client configuration that I have to use should be different than what I currently have. So, what should I do to implement all these packages or the new client environment ?

Maybe you are looking for