Problem with HTTP POST

Discussion in 'Programming' started by WillMarflow, Oct 9, 2008.

  1. #1
    Hi,

    we´re trying to setup payments on our site through a third-party payment processor.

    We are having trouble getting the POST through from them to us for some reason.

    When I try sending the POST data through an ADD-ON in FireFox called Poster, it only works when I put "Content-Type" as "application/x-www-form-urlencoded".

    It does not work when I have "Content-Type" as "text/xml".

    We think this is the problem.

    How do we make our site accept "text/xml" and not only "application/x-www-form-urlencoded"?



    If you give advice, and I solve it because of it, I´ll send you $10 instantly via PayPal.

    Thanks
     
    WillMarflow, Oct 9, 2008 IP
  2. techMonster

    techMonster Peon

    Messages:
    20
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Post request header, has got two values of Content-Type. The first and the default one is "application/x-www-form-urlencoded" and the second is "multipart/form-data".

    In the main Post request header, you cannot include any content type other than one mentioned above. If you want to send a xml file, you will need to generate a multipart post request. You will find many tutorials on the net, on how multipart post requests work.
     
    techMonster, Oct 9, 2008 IP