I've been checking out the classes provided with 11.5 SP1 for HTTP requests. I seem to be stuck with an off error when trying to urlencode a string. Now I'm not sure I'm doing this right but when I execute the code below, I get the error "Only "Character" is a valid type option for a LONGCHAR variable (11673).
What am I doing wrong?
USING OpenEdge.Net.*. def var address as char. Address = "Some Test Address". Address = URI:Encode(Address, UriEncodingTypeEnum:Query) . MESSAGE Address VIEW-AS ALERT-BOX.
Thread created by tbergmanI've been checking out the classes provided with 11.5 SP1 for HTTP requests. I seem to be stuck with an off error when trying to urlencode a string. Now I'm not sure I'm doing this right but when I execute the code below, I get the error "Only "Character" is a valid type option for a LONGCHAR variable (11673).
What am I doing wrong?
USING OpenEdge.Net.*. def var address as char. Address = "Some Test Address". Address = URI:Encode(Address, UriEncodingTypeEnum:Query) . MESSAGE Address VIEW-AS ALERT-BOX.
Stop receiving emails on this subject.Flag this post as spam/abuse.
Hi Roger,
No, defining it as a longchar won't even compile as it's not a proper data type for the first parameter of the encode method.
Reply by tbergmanHi Roger,
No, defining it as a longchar won't even compile as it's not a proper data type for the first parameter of the encode method.
Stop receiving emails on this subject.Flag this post as spam/abuse.
I've been checking out the classes provided with 11.5 SP1 for HTTP requests. I seem to be stuck with an off error when trying to urlencode a string. Now I'm not sure I'm doing this right but when I execute the code below, I get the error "Only "Character" is a valid type option for a LONGCHAR variable (11673).
What am I doing wrong?
USING OpenEdge.Net.*.
def var address as char.
Address = "Some Test Address".
Address = URI:Encode(Address, UriEncodingTypeEnum:Query) .
MESSAGE Address
VIEW-AS ALERT-BOX.
Flag this post as spam/abuse.
Hi Peter,
Thanks, that does make the method work without the error message.
It still has a bug. Passing a string with more than 3 words, results in the last space not being encoded.
The result from “14 Oak Bedford ma” is “14%20Oak%20Bedford ma”.
Thanks,
Tom
USING OpenEdge.Net.*. def var address as char. Address = "14 Oak Bedford ma". Address = URI:Encode(Address, UriEncodingTypeEnum:Default) . MESSAGE Address VIEW-AS ALERT-BOX.
Hi Peter,
Thanks, that does make the method work without the error message.
It still has a bug. Passing a string with more than 3 words, results in the last space not being encoded.
The result from “14 Oak Bedford ma” is “14%20Oak%20Bedford ma”.
Thanks,
Tom
USING OpenEdge.Net.*.
def var address as char.
Address = "14 Oak Bedford ma".
Address = URI:Encode(Address, UriEncodingTypeEnum:Default) .
MESSAGE Address
VIEW-AS ALERT-BOX.
Flag this post as spam/abuse.
Hi Folks,
I have logged bug number PSC00334668 for this issue.
Sincerely, Brian Maher