Quantcast
Channel: SCN: Message List - ABAP Connectivity
Viewing all articles
Browse latest Browse all 3125

Problem: Access-Control-Allow-Origin

$
0
0

I am trying to make a CORS request from some other domian.

But i need to set response header field 'Access-Control-Allow-Origin'  on server side i.e. in abap code.

I have created a webrfc of Function module and calling that function module via URL.

Now i have to set response header in that FM only.

Please help me with the abap code that need to be placed there.

 

runtime->server->response->set_header_field( name  = 'Access-Control-Allow-Origin'

                                             value = '*' ).

runtime->server->response->set_header_field( name  = 'Access-Control-Allow-Methods'

                                             value = 'POST, GET' ).

 

i have few basic doubts , how to get the runtime value and server value ??

How to create response object and set the header accordingly in abap?

 

 

basically m stuck in calling the above methods.

 

Please advise.

 

Thanks in advance.


Viewing all articles
Browse latest Browse all 3125

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>