Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

URL too long for HTTP_GET

Former Member
0 Kudos

I'm passing data as a query string in the URL calling the HTTP_GET function. Unfortunately, the length of the query string is beyond the 255 barrier of the URL. Is there a way to direct the query string parameters into one of the table(s) to accomplish my task (REQUEST_HEADERS or REQUEST_ENTITY_BODY)? If so, do the parameters take on the same format (field=value)? I would appreciate any help.

Thanks in advance.

Terry

9 REPLIES 9

athavanraja
Active Contributor
0 Kudos

Instead use CL_HTTP_CLIENT class.

For sample programs on this search for RSHTTP* from se38.

Regards

Raja

0 Kudos

Raja,

I've already looked though the standard SAP HTTP programs, and they don't address this situation. Also, we're on 4.6c, and that class is not available (I wish it were). I appreciate your suggestions though.

Thanks,

Terry

Message was edited by: Terry West

Former Member
0 Kudos

Hello,

I used a data element called DMS_URL for either to receive a URL and pass URL to a function. SAP uses this in DMS and Content Server communication.

DATA: w_url TYPE dms_url.

Hope this helps.

Sumant.

0 Kudos

Hello Sumant,

I've tried that also, but that doesn't work either. It actually seems as if the cutoff is at 132 characters instead of the initially thought of 255.

Thanks,

Terry

0 Kudos

Hi,

it's not a good solution, but you can play with the tiny url fonction that you could find in the web.

example : http://tinyurl.com/

Frédéric

0 Kudos

Hi Frédéric,

Thanks for the suggestion, but that's probably a little more than what I'm looking to invest into this application.

Regards,

Terry

Former Member
0 Kudos

I had to use HTTP_POST instead of HTTP_GET. In the function, there are two request tables (REQUEST_HEADERS and REQUEST_ENTITY_BODY). Both of these tables must be filled with the proper information for the query string to work. The header table requires HTTP header information (Content-type: ????) where ???? is the type of content being sent. The body table contains what the header table describes, which in my case was the query string.

BTW - I found OSS note #143145 that applies to the 132 character limitation that was the original problem with the URL.

Thanks to everyone for their suggestions. 🐵

Regards,

Terry

0 Kudos

Can you post the code...???

Thank's.

0 Kudos

This message was moderated.