Hello evryone, i am new to the web development, and i have some isues with POST.
I have to send some values to an external server (to hostelworld.com) for the booking of some hostel using POST. The values are e-mail, first name, credit card number ecc..
I have created a form with textaras, check box, etc... with all the variables requiered. This is the form:
Now when i made the request, i got an errore, becose the sever of hostelworld talkes the ip of the client, and not the ip of the server, and dosen't allowed the connection.
I think this is an errore becouse there is something wrong withg the post request. I have not inserted in the request this part:
POST .........HTTPS/1.0
Host:.......
Content-Type: .....
Content-Length: .......
I don't now how to insert this in the form, or if i have to insert this in some other way.
Any help is very appreciated.
becose the sever of hostelworld talkes the ip of the client, and not the ip of the server, and dosen't allowed the connection.
Is this a guess or a fact? Does the API documentation say something about an IP?
More information that is needed/would be really helpful is:
1) More details about the API, if you have them
2) Your attempted POST request (you've omitted it above, we need to see it, you can replace sensitive parts with X's, if need be).
3) The response (i.e. error) received from the server
If you've got a link to the "live" test form, that might help as well. When in doubt, post everything you've got for us to see!
Last edited by aj_nsc; 05-25-2010 at 12:47 PM.
I've switched careers...
I'm NO LONGER a scientist,
but now a web developer...
awesome.
becose the sever of hostelworld talkes the ip of the client, and not the ip of the server, and dosen't allowed the connection.
Is this a guess or a fact? Does the API documentation say something about an IP?
This is a fact. This is writen in the API: To be set-up to use the XML API, you will need to contact Hostelworld.com
(affiliates@hostelworld.com) with the IP address (or range of IP addresses) that you will be connecting to the service from. This is so we can authenticate each affiliate as they connect to make sure each request is legitimate. Once this has been done, you’re ready to start development.
3)Authentication Failed Your 'UserID' could not be authenticated with your connection details. Please check your 'UserID' or contact Web Reservations to have your account activated. xxxxx.com xxx.xxx.xxx.xxx
wheere xxxx.com is the username i use to conect to the api and xxx.xxx.xxx.xxx is my ip adress
Thank you again for your Help, i really appreciate it.
Nigel
Thank you, this really help me. When i was googeling for my problem i found the site you sugest me a lot of time, but when i was trying i must have done something wrong. Now i think i resolved my problem. Really thank you to all for helping me.
Bookmarks