Hello,
I'm using this code to try and send a PUT request:
select 'dbr.http.debug', 1;
select 'dbr.http.option', 'curl', 'CURLOPT_HTTPHEADER', concat('authorization: ', @token);
select 'dbr.http.option', 'curl', 'CURLOPT_HTTPHEADER', 'accept: application/json';
select 'dbr.http.option', 'curl', 'CURLOPT_HTTPHEADER', 'content-type: application/json'; select 'dbr.http.option', 'curl', 'CURLOPT_POSTFIELDS', json_object('orgId', @org_id); select 'dbr.http.put', @session_url;
But this is the debug output I'm receiving:
* Trying hidden...
* TCP_NODELAY set
* Connected to hidden port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /etc/ssl/certs/ca-certificates.crt
CApath: /etc/ssl/certs
* SSL connection using TLSv1.3 / TLS_AES_128_GCM_SHA256
* ALPN, server accepted to use h2
* Server certificate:
* subject: CN=getsling.com
* start date: Feb 21 00:00:00 2023 GMT
* expire date: Jan 2 23:59:59 2024 GMT
* subjectAltName: host hidden
* issuer: C=US; O=Amazon; CN=Amazon RSA 2048 M02
* SSL certificate verify ok.
* Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* Failed sending POST request
* Connection #0 to host hidden left intact
Array
(
[curl_getinfo] => Array
(
[url] => hidden
[content_type] =>
[http_code] => 0
[header_size] => 0
[request_size] => 0
[filetime] => -1
[ssl_verify_result] => 0
[redirect_count] => 0
[total_time] => 0.010291
[namelookup_time] => 0.000598
[connect_time] => 0.001891
[pretransfer_time] => 0
[size_upload] => 0
[size_download] => 0
[speed_download] => 0
[speed_upload] => 0
[download_content_length] => -1
[upload_content_length] => 154
[starttransfer_time] => 0
[redirect_time] => 0
[redirect_url] =>
[primary_ip] => hidden
[certinfo] => Array
(
)
[primary_port] => 443 [local_ip] => hidden [local_port] => 53868 [http_version] => 0 [protocol] => 2 [ssl_verifyresult] => 0 [scheme] => HTTPS [appconnect_time_us] => 10237 [connect_time_us] => 1891 [namelookup_time_us] => 598 [pretransfer_time_us] => 0 [redirect_time_us] => 0 [starttransfer_time_us] => 0 [total_time_us] => 10291 )
[postfields] => []
[result] =>
)
Specifically, I'm seeing "Failed sending POST request". Why is the server trying to send a POST request? Additionally, why is [postfields] empty?
And do you see any issues with the MyDBR code?
Thank you