Any suggestion for mbed HTTP library (mbed-http not work with recent mbed-os)

I am working on an IoT application to connect with Google Firebase. The mbed-http library seem to be broken by recent mbed-os upgrades (latest version to work is 5.11). I have tried both mbed CLI and online compiler of which ended by compiler errors. I have tracked to a conclusion that the modification of the connect() method of TCPSocket and also TLSSocket classes is the root cause as seen from the following compiler errors.

./mbed-http/source/http_request.h: In member function ‘virtual nsapi_error_t HttpRequest::connect_socket(char*, uint16_t)’:
./mbed-http/source/http_request.h:96:57: error: no matching function for call to ‘TCPSocket::connect(char*&, uint16_t&)’
96 | return ((TCPSocket*)_socket)->connect(host, port);
| ^
In file included from ./mbed-os/features/netsocket/nsapi.h:41,
from ./mbed-os/mbed.h:26,
from .\source\main-http.cpp:5:
./mbed-os/features/netsocket/TCPSocket.h:81:19: note: candidate: ‘virtual nsapi_error_t TCPSocket::connect(const SocketAddress&)’
81 | nsapi_error_t connect(const SocketAddress &address) override;
| ^~~~~~~
./mbed-os/features/netsocket/TCPSocket.h:81:19: note: candidate expects 1 argument, 2 provided

Since the mbed-http library does not turn official even mentioned by mbed blogs, anyone may suggest a better solution for HTTP request/response code. At present, the official TCPSocket and TLSSocket seem to be an outdated approach.

You can try this:

There is an update coming up for the ‘depreciated’ stuff in a few days, testing it now.
Otherwise it simply works.

Thank you very much. Just saw your post after spent the whole day to fix the broken mbed-http library. BTW, the following are for HTTP version if anyone may need.

  1. remove an incompatible constructor method in mbed-http/source/http_request.h
    HttpRequest(NetworkInterface* network, http_method method, const char* url, Callback<void(const char *at, uint32_t length)> bodyCallback = 0) : HttpRequestBase(NULL, bodyCallback) { ... }
    
  2. modify code in mbed-http/source/http_request.h from obsoleted string-based Socket API
    virtual nsapi_error_t connect_socket(char *host, uint16_t port) {
        return ((TCPSocket*)_socket)->connect(host, port);
    }
    
    to new mbed 5.15 SocketAddress-based API
    virtual nsapi_error_t connect_socket(const SocketAddress &address) {
        return ((TCPSocket*)_socket)->connect(address);
    }	
    
  3. modify code in mbed-http/source/http_request_base.h from obsoleted Socket API
    virtual nsapi_error_t connect_socket(char *host, uint16_t port) = 0;
    
    to
    virtual nsapi_error_t connect_socket(const SocketAddress &address) = 0;
    
  4. remove code in mbed-http/source/http_request_base.h to exclude obsoleted string-based Socket API
    // Line 75:
    if (_socket && _we_created_socket) {
    	delete _socket;
    }
    // Line 246
    if (_we_created_socket) {
    	nsapi_error_t connection_result = connect_socket(_parsed_url->host(), _parsed_url->port());
    	if (connection_result != NSAPI_ERROR_OK) {
    		return connection_result;
    	}
    }
    // Line 326
    if (_we_created_socket) {
    	// Close the socket
    	_socket->close();
    }	
    // Line 343
    bool _we_created_socket;