2024 Nov 19 1:54 PM - edited 2024 Nov 19 1:57 PM
Hi there,
I want to send a newly created HTTP request based on if_http_request or cl_http_request without using the request which is stored in the HTTP client.
I guess the default way to send a HTTP request looks kind of like this:
DATA(client) = cl_http_client=>create( ).
" Prepare request
client->request->set_method( ... ).
client->request->set_header_field( ... ).
...
client->send( ... ).
By debugging, this way is working, not least because the request object stored in the client contains a member attribute named m_c_msg that is initialized.
I would like to decouple the creation and initialization of the HTTP request by underlying the HTTP client:
DATA(client) = cl_http_client=>create( ).
" Prepare request
DATA(request) = NEW cl_http_request( ).
request->set_method( ... ).
request->set_header_field( ... ).
...
client->request = request.
client->send( ... ).
In my way the request seems not to be initialized correctly and therefore the sending fails.
Can anyone tell me if it is possible to implement my prefered solution and give me some hints?
BR
Request clarification before answering.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 6 | |
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.