Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6151091
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T19:43:11+00:00 2026-05-23T19:43:11+00:00

In the Reference of HttpRequest.HttpMethod of .NET Framework, request type is declared with System.String

  • 0

In the Reference of HttpRequest.HttpMethod of .NET Framework, request type is declared with System.String type.

In RFC 2616 all HTTP request methods are declared (e.g. POST, GET, PUT, DELETE…).

There’s also similar behavior in HttpWebRequest and WebRequest classes of .NET.

Java has the similar approach on HttpURLConnection#setRequestMethod(String) method.

Why do these language designers do not consider implementing an enum for those HTTP methods?

Do you have an idea?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T19:43:13+00:00Added an answer on May 23, 2026 at 7:43 pm

    The first sentences of your RFC 2616 link (emphasis added):

    The set of common methods for HTTP/1.1 is defined below. Although this set can be expanded…

    That is to say, the method in HTTP may be anything. There are “well known” or common methods, the semantics of which are well understood (well, okay, should be well understood – I still encounter people unclear on GET/POST).

    But any application may implement other methods. Hopefully, the semantics of those other methods will be well understood between client and server applications.

    For these reasons, an enum would be inappropriate, since there can always be “other” values that wouldn’t fit in that enum.


    More quotes from the RFC 2616:

    Practical information systems require more functionality than simple
    retrieval, including search, front-end update, and annotation. HTTP
    allows an open-ended set of methods
    and headers that indicate the
    purpose of a request

    and,

    The Method token indicates the method to be performed on the
    resource identified by the Request-URI. The method is case-sensitive.

       Method         = "OPTIONS"                ; Section 9.2
                      | "GET"                    ; Section 9.3
                      | "HEAD"                   ; Section 9.4
                      | "POST"                   ; Section 9.5
                      | "PUT"                    ; Section 9.6
                      | "DELETE"                 ; Section 9.7
                      | "TRACE"                  ; Section 9.8
                      | "CONNECT"                ; Section 9.9
                      | extension-method
       extension-method = token
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to reference a COM DLL in a .NET project, but I also
Problem : Trying to reference a .NET 2.0 web service project from my VS
NOTE: Using .NET 2.0, and VS2005 as IDE Hello all, I'm working on logging
I'm trying to Add Service Reference to SharePoint web services (e.g., http://cogent-moss/_vti_bin/Webs.asmx ), but
I'm trying to create a simple application that does a HTTP request/response on a
I'm using a service called TrueFX that provides currency information based on HTTP request/response.
All sample function I've seen so far avoid, for some reason, returning a string.
Scenario: The browser submits a HTTP request to a server. The user simultaneously clicks
Reference: http://www.facebook.com/note.php?note_id=389414033919 They said they build it in PHP and Javascript, which is great,
With reference to this programming game I am currently building. alt text http://img12.imageshack.us/img12/2089/shapetransformationf.jpg To

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.