cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: How to include HTTP request headers in the JAVA program using CURL

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 16 Sep 2011 09:07:04 +0200 (CEST)

On Fri, 16 Sep 2011, Pruthvi Ravindranath wrote:

>          In the curl Java binding I am not able to find a method to include
> http request headers. In C, there is a option of giving a linked list of
> headers in curl_easy_setopt() method. But in Java, the format of functions
> are curl_object.setopt(int, int), curl_object.setopt(int, CurlWrite obj) or
> curl_object.setopt(int, String). How to use this option.??
>
> curl_object.setopt(CURL.OPT_HTTPHEADER, ???????????);

The README clearly explains that not every setopt() option is implemented, so
I assume you've found one of those that need attention. Just add your code for
it and it'll be done.

libcurl bindings are written and maintained by separate projects and teams, as
we here focus on the actual C library and its API. Therefore you may not reach
that many users (or maintainers) of particular bindings here.

To my knowledge, the java binding has never been excessively used and thus
still remains rather basic and far from complete.

-- 
  / daniel.haxx.se

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-09-16