Skip to content

Standardise method naming across all HTTP verbs #41

Description

@DaraOladapo

Description

The string-returning method family uses inconsistent names depending on the HTTP verb:

Verb Method name
GET GetAsStringAsync
POST PostAndGetResponseAsStringAsync
PUT PutAndGetResponseAsStringAsync
PATCH PatchAndGetResponseAsStringAsync
DELETE DeleteAndGetResponseAsStringAsync

GET uses a shorter, cleaner convention; the other four use a verbose AndGetResponseAsString infix. This creates an inconsistent API surface that surprises callers switching between verbs.

Proposed Fix

Adopt one convention for all verbs. The GET style is more idiomatic:

Old name New name
PostAndGetResponseAsStringAsync PostAsStringAsync
PutAndGetResponseAsStringAsync PutAsStringAsync
PatchAndGetResponseAsStringAsync PatchAsStringAsync
DeleteAndGetResponseAsStringAsync DeleteAsStringAsync

Keep the old names as [Obsolete]-decorated overloads for one version cycle to avoid a hard breaking change, then remove them in the next major version.

Acceptance Criteria

  • All string-returning methods follow the {Verb}AsStringAsync pattern
  • Old verbose names are marked [Obsolete] with a message pointing to the new name
  • Tests use the new names
  • CHANGELOG / release notes call out the rename

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    Status
    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions