on 05-08-2009 1:50 AM
Hi Everyone,
I have created new sub-element (test_html) in SICF node and assigned a http handler class.
I can test my handler class and also add a parameter to my URL and get the details in the
IF_HTTP_EXTENSION~HANDLE_REQUEST method of the class using:
server->request->get_form_fields( CHANGING fields = fields ).
This is all fine as normal.
My problem might sound bit strange but I need this.(please don't ask me why I need this)
My URL looks like: http://<server>:<port>/custom/test_html?screen=1
If you would have noticed when we change the URL to
http://<server>:<port>/custom/test_html/blablabla?screen=1 everything still works fine.
What I want is: how can I get what has been added before '?' not as parameter, In this case blablabla.
test_html is my defined sub-element so anything I add after it using '/' and not '?' as I can get the parameters any ways.
Any solutions? any method or FM to get the URL? I tried using FM HTTP_GET_URL2 and HTTP_GET_URL but anything after the sub-element name and before the parameter is getting ignored.
Any solutions would be highly appreciated.
Thanks & Regards,
Abhinav
Hi Abhi,
this stuff is stored in the request header fields.
You can access them with the method call
server->request->get_header_fields
in the IF_HTTP_EXTENSION~HANDLE_REQUEST method.
Cheers
Graham Robbo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
server->request->get_header_field( name = if_http_header_fields_sap=>path_info ).
is the solution.
Regards,
Abhinav
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
at runtime and debugging mode: have a look at the SERVER object and its values.
The runtime passes this to HANDLE_REQUEST method.
SERVER has also other useful attributes like request and response.
Best regards, Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.