Issue with httpSocket overload

Hi,

I use the xojo.net.httpsocket.

self.ghSocket.Send("POST", "https://graphhopper.com/api/1/vrp/optimize?key=" + APIKey)

self is a class, ghSocket is an instance of a xojo.net.httpsocket.

Following issue:
When I try to use the send method, I get a strange Error from the compiler:

In the documentation here are two overloaded methods. One with a folderitem.
But why occure this exception if I dont use a folderitem in the third parameter? There should be no problem, the methods are unique and my code seems to be right.

Try defining a text variable before the Send method that concatenates your url.

dim url as Text = "https://graphhopper.com/api/1/vrp/optimize?key=" + APIKey self.ghSocket.Send("POST", url)

It might be creating a string variable rather than text if you do it within the method.

I’m a step further:
my ghSocket is a subclass of httpSocket (with no changes or overwrites).

Also I need to direct add it to a layout (such as webpage or container).
From this I can use the send method.

But why is that so @xojostaff???

There must be a way to use httpsocket more dynamic?!

[quote=343599:@Jared Feder]Try defining a text variable before the Send method that concatenates your url.

[/quote]

Thanks for your reply

A variable of type text can’t be used. If I use a string variable, the same exception happens. :confused:

Xojo.Net.HTTPSocket, which you were using originally, requires a text variable as the URL.

The classic HTTPSocket requires a string, so my reply is not longer accurate since you changed your superclass.

[quote=343602:@Jared Feder]Xojo.Net.HTTPSocket, which you were using originally, requires a text variable as the URL.

The classic HTTPSocket requires a string, so my reply is not longer accurate since you changed your superclass.[/quote]

Thank you for your help! I brought it to work.

I always used strings. With a text variable it’s working!

Sometimes I have some struggles with the new framework and its interferences with the classic one.

Thank you