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: 

How to pass parameter in HTTP_POST or HTTP Class

Former Member
0 Kudos
121

I want to use HTTP_POST to pass xml info by http_post. I want to pass a simple parameter and receive it in a JSP first for test. I assign the value in the following way:

...

TYPES: BEGIN OF text,

line(256),

END OF text.

DATA xml TYPE TABLE OF text WITH HEADER LINE.

xml-line = 'apple=aaa'.

APPEND xml.

and then ...

CALL FUNCTION 'HTTP_POST'

...

TABLES

REQUEST_ENTITY_BODY = xml

response_entity_body = response

response_headers = response_headers.

******************************************************

then I use a JSP to receive the parameter, but what I get from "apple" is null.

<br>Param APPLE

<%

String apple=request.getParameter("apple");

out.println(apple);

%>

QUESTION:

1 Is this way correct for passing a parameter via a HTTP? It seems I failed to pass a parameter.What is the correct way?

2 If I want to pass a whole xml string, what format should I organize my data stream?Maybe I should use cl_http_client to make it?

2 REPLIES 2

Former Member
0 Kudos
78

Hi Yichao,

Refer the following thread:

Hope this will help you.

Regards,

Nitin.

Former Member
0 Kudos
78

Ok Thanks~

Edited by: Yichao Sun on Feb 24, 2009 8:26 AM