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

  • Home
  • SEARCH
  • 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 7675209
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T16:54:35+00:00 2026-05-31T16:54:35+00:00

In developing an API, there is a requirement to provide custom request methods that

  • 0

In developing an API, there is a requirement to provide custom request methods that make sense to a consumer of the API (developer). The “standard” set of request methods, as per RFC-2616 are:

  • GET
  • PUT
  • POST
  • DELETE
  • TRACE
  • CONNECT

I would like to add another, called SEARCH. On the API, using PHP or Java, this is easy to implement in PHP. The consumption of this new request method is proving to be a challenge for an android and iOS developer.

Working:

  • Javascript [ works via JQuery or XDomainRequest ]
  • Java [ works via HttpUrlConnection ]
  • PHP [ works via cURL ]:

Working Example:

 curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'SEARCH');

Not Working:

  • iOS
  • Android [ my assumption is that this should work fine if I have a working Java example ]

Does anyone have any references to working examples or frameworks that will support a custom request method, such as SEARCH, or FOOBAR?

Kind regards

  • 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-31T16:54:36+00:00Added an answer on May 31, 2026 at 4:54 pm

    In Android, if you use the bundled Apache Httpclient library, you can create a custom HTTP Method by extending HttpRequestBase. In fact, classes for all the standard HTTP methods (HttpGet, HttpPost etc) in this library extend from the same class.

    If your SEARCH method is very “similar” to any of the existing methods, you can directly extend that class. For instance, for the purpose of illustration, let’s assume it is very close to the GET method. Then you could create a class HttpSearch which extends HttpGet and then customize the implementation by overriding appropriate methods.

    Once you have your HttpSearch implementation ready, using it is similar to using a standard HttpGet class:

    HttpClient client = new HttpClient;
    //...
    //...
    HttpSearch search = new HttpSearch;
    //...
    client.execute(search);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know that there are many API's like JSON, Facebook, Twitter etc for developing
There are alternatives to developing for iPhone besides the native Objective-C API. In particular,
I'm developing a API that uses lambda expressions to specify properties. I'm using this
I'm developing a REST api. To simplify my question, I have an API that
I am developing an custom API for a web solution and I am using
I am developing a REST API that supports two kinds of authentication protocols: login
I am developing an API for some application. And I need to attach there
I'm developing a mobile application that needs access to Twitter. There's a ton of
I am currently developing a web app that uses Google's Static Map API, in
i am developing a Java Api to do things (secret, uhhhh ;). Is there

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.