Skip to content

Deprecation warnings in serve_http #12

Description

@JosiahParry

Trying out the mcpr package I had the following experience.

I'm surprised to see that the deprecation warnings

Error in `mcpr::serve_http()`:
! The 'ambiorix' package is required for HTTP transport. Please install it with install.packages('ambiorix')
Show Traceback
> install.packages("ambiorix")
also installing the dependencies ‘log’, ‘webutils’

trying URL 'https://cran.rstudio.com/bin/macosx/big-sur-arm64/contrib/4.6/log_1.1.1.tgz'
trying URL 'https://cran.rstudio.com/bin/macosx/big-sur-arm64/contrib/4.6/webutils_1.2.2.tgz'
trying URL 'https://cran.rstudio.com/bin/macosx/big-sur-arm64/contrib/4.6/ambiorix_2.2.1.tgz'

The downloaded binary packages are in
	/var/folders/wd/xq999jjj3bx2w8cpg7lkfxlm0000gn/T//RtmpSyOREP/downloaded_packages
> mcpr::serve_http(mcp)
✔ 12-01-2026 13:32:50 Listening on http://0.0.0.0:3000
✖ 12-01-2026 13:32:52 GET on / - Not found
✖ 12-01-2026 13:32:52 GET on /favicon.ico - Not found
✖ 12-01-2026 13:32:55 GET on /tools - Not found

Warning messages:
1: In res$set_header("Access-Control-Allow-Origin", "*") :
  Deprecated. This is deprecated, use the `header()` method.
2: In res$set_header("Access-Control-Allow-Methods", "POST, OPTIONS") :
  Deprecated. This is deprecated, use the `header()` method.
3: In res$set_header("Access-Control-Allow-Headers", "Content-Type") :
  Deprecated. This is deprecated, use the `header()` method.
4: In res$set_header("Access-Control-Allow-Origin", "*") :
  Deprecated. This is deprecated, use the `header()` method.
5: In res$set_header("Access-Control-Allow-Methods", "POST, OPTIONS") :
  Deprecated. This is deprecated, use the `header()` method.
6: In res$set_header("Access-Control-Allow-Headers", "Content-Type") :
  Deprecated. This is deprecated, use the `header()` method.
7: In res$set_header("Access-Control-Allow-Origin", "*") :
  Deprecated. This is deprecated, use the `header()` method.
8: In res$set_header("Access-Control-Allow-Methods", "POST, OPTIONS") :
  Deprecated. This is deprecated, use the `header()` method.
9: In res$set_header("Access-Control-Allow-Headers", "Content-Type") :
  Deprecated. This is deprecated, use the `header()` method.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions