HTTP over TCP/IP

HTTP over TCP/IP SearchSearch
Author Message
Oliver Palmer
New member
Username: Opalmer

Post Number: 6
Registered: 12-2003
Posted on Wednesday, July 28, 2004 - 01:43 pm:   

Hey BN,

Glad to see you are back! Just a quick question for you.

I have been happily delivering messages with an SMPP connection for the past 8 months however my gateway wants me to switch to HTTP over TCP/IP this is all well and good except NowSMS wants to do things with the message. Like add :80 on to the end as port when then the gateway does not need a port specified in the URL. The gateway requires something like:

http://api.mygateway.com/http/sendmsg?username=xxxx&password=xxxx&to=xxxx&text=x xxx

With SMPP I am happily delivering WAP Push messages using whatever NowSMS uses to create WAP push messages. And everything works perfectly. So what I want is just a vanilla connection to the gateway via HTTP in the same way that SMPP works and simply have NowSMS delivery the message as is to the gateway.

If you could let me know how I do this that would be wonderful.

Cheers,

Oliver
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 3159
Registered: 10-2002
Posted on Wednesday, July 28, 2004 - 10:05 pm:   

Hi Oliver,

If the port number is 80, we won't actually send it in the request. (And even if we did, it shouldn't cause a problem.)

Basically, you have to define an HTTP template for both text and binary messages. The template part is the part after the host name (.e.g., /http/sendmsg...).

Where do you seem to be running into a problem?

-bn
Oliver Palmer
New member
Username: Opalmer

Post Number: 7
Registered: 12-2003
Posted on Saturday, July 31, 2004 - 08:54 am:   

Hey Bryce,

No matter what I do I end with an error message saying:

"Unable to connect to server http://api.mygateway.com:80"

Now this is the case because I need to specify the api_id and the username and password whilst making the connection. I have tried putting them in the HTTP Template but I still get the same "Unable to connect" message. It appears that it doesn't even attempt to add on the parameters required.

And it is adding the port 80 suffix on despite not needing to.

Any suggestions?

Cheers,

Ol
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 3202
Registered: 10-2002
Posted on Monday, August 02, 2004 - 10:25 pm:   

Hi Oliver,

I was scratching my head on this one. But then it hit me.

If you are entering "http://" as part of the host name, try it without that.

"http://" is assumed, and if it is present, it looks like we treat it as part of the host name instead of as a prefix.

-bn