Method needs string accessors

Open
#88 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
55/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
cpp
Domain
api

Research direction

Start by locating Request::get_method(), Request::set_method(), Request::with_method(), and the Method enum in the C++ SDK. Trace how method values are represented and used, then confirm that nonstandard verbs such as PURGE can be passed and retrieved while existing method handling remains supported.

Written by the indexing model from the issue text.

Description

Request::get_method() / Request::set_method() / Request::with_method() currently work with the enum Method, but this needs to be possible to treat as a string to support nonstandard HTTP verbs.

With Fastly, it is a common use case to check for the PURGE verb in Compute to detect those requests and send them directly through the readthrough cache which handles that verb.

One potential way to handle this is to change these functions to take string and change the enum to string constants.

Dominant language
C++
Stars
9
Forks
2
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from fastly/compute-sdk-cpp

All issues in fastly/compute-sdk-cpp

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.