on 05-28-2014 8:09 AM
Hi Experts,
how can i read custom http header inside my DPC_EXT class. i am using gateway client there i am creating one custom HTTP header like below
Name : Mytest
value :mytests value
i am sending request using GET method
inside my DPC_EXT method i am using below lines to access http header , but i am not getting.
Data : Lo_facade type ref to /IWBEP/IF_MGW_DP_INT_FACADE,
lt_client_headers type TIHTTPNVP.
lo_facade ?= /iwbep/if_mgw_conv_srv_runtime~get_dp_facade( ).
lt_client_headers = lo_facade->get_request_header( ).
Regards
Saumya
Hi Soumya,
you can check if you are really sending the header in Chrome.
Press f12, select tab Network, then perform your oData action and you should see HTTP request header as it is here https://developer.chrome.com/devtools/docs/network#http-headers
Regards,
Peter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I see you put the code in GET_STREAM method. put the same code in GET_ENTITY method and you will be able to get the value.
But anyway it should also work in GET_STREAM method. I just redefined this method in my DPC_EXT class and put the same code and I am able to see the values.
Message was edited by: Chandrashekhar Mahajan
Hi Soumya,
is is strange, it does not work, I don't know why.
I guess you have two options:
1. Contact OSS support, raise message to SAP, they will help you
2. Do not send parameters in header, but as a Key Field. Just extend your entity with more key fields and provide their values in url. Is this a problem for you?
Regards,
Peter
The code is correct. I hope you are inserting header name and value in request header. you should get those values in lt_client_headers.
Regards,
Chandra
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Can i know ur Gateway SP Version
Regards,
Jibin Joy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.