Application Development and Automation 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: 

Is it possible to do a POST call using a standard API in a custom logic?

erlotayamen
Explorer
0 Kudos
523

Hi Experts,

I have a custom logic I'm testing where I do a GET oData request in the code using a standard class similar to this:

* Fetch X CSRF TOKEN
    DATA(request) = cl_ble_http_request=>create( ).
    request->set_header_parameter( exporting name = 'X-CSRF-TOKEN' value = 'FETCH' ).
    request->set_method( 'GET' )->set_resource_extension( lv_costrev_api ).
    TRY .
        DATA(response1) = lo_client->send( request ).
        DATA(lv_csrf) = response1->get_header_parameter( 'x-csrf-token' ).
        CATCH cx_ble_http_exception INTO DATA(l5).
    ENDTRY. 

The GET Request worked fine - however, when I try to a POST, the page is loading until I exit the page.

My question remains, is doing a POST using the lo_client->send( request ) meant to work? If so, why is it loading indefinitely?

Thanks.

0 REPLIES 0