Skip to content

Feature: Document HTTP headers for RPC (JSON/CBOR) #1165

Open
@IngwiePhoenix

Description

@IngwiePhoenix

Is your feature request related to a problem?

I ran into this:

2025-02-12T07:01:49.011002Z  WARN surreal::net::rpc: A connection was made without a specified protocol.
2025-02-12T07:01:49.011015Z  WARN surreal::net::rpc: Automatic inference of the protocol format is deprecated in SurrealDB 2.0 and will be removed in SurrealDB 3.0.
2025-02-12T07:01:49.011016Z  WARN surreal::net::rpc: Please upgrade any client to ensure that the connection format is specified.
2025-02-12T07:01:49.104529Z  WARN surreal::net::rpc: A connection was made without a specified protocol.
2025-02-12T07:01:49.104543Z  WARN surreal::net::rpc: Automatic inference of the protocol format is deprecated in SurrealDB 2.0 and will be removed in SurrealDB 3.0.
2025-02-12T07:01:49.104545Z  WARN surreal::net::rpc: Please upgrade any client to ensure that the connection format is specified.

Which resolves here: https://github.com/surrealdb/surrealdb/blob/0ee8dc2c3ec8e883038d0ee00bbce6a6126fe655/src/net/rpc.rs#L63-L67
...and is set here: https://github.com/surrealdb/surrealdb/blob/0ee8dc2c3ec8e883038d0ee00bbce6a6126fe655/crates/sdk/src/api/engine/remote/ws/native.rs#L81
...and is defined here: https://github.com/surrealdb/surrealdb/blob/0ee8dc2c3ec8e883038d0ee00bbce6a6126fe655/crates/sdk/src/api/engine/remote/ws/mod.rs#L26

Describe the solution

I'd like a small section about what headers must be set to properly address SurrealDB via RPC - those are just the things that I came across during my driver development, but I expect things to eventually change. for that case, documentation on them would be neccessary.

Alternative methods

Make the warn!(...) output more verbose; actually let the user know that a header was missing. Right now, this message is a little...nebulous? It tells you that there is a problem, but not what the problem actually is.

Contact Details

[email protected]

Is there an existing issue for this?

  • I have searched the existing issues

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions