This appears to be a write attempt to InfluxDB 0.8. Is that correct?

What error code do you receive from the write attempt? Have you tried
writing using direct CURL statements? What's in the logs?

On Tue, Aug 2, 2016 at 5:03 AM, <[email protected]> wrote:

>        For the first time, according to the official website to write.Why,
> always an error.Please, give me a correct way.Thank you very much.
>
>
> String url = "http://localhost:8086/db/mydb/series?u=admin&p=123456";;
>                 URL obj = new URL(url);
>                 HttpURLConnection con = (HttpURLConnection)
> obj.openConnection();
>
>                 //add reuqest header
>                 con.setRequestMethod("POST");
>                 con.setRequestProperty("Accept-Language",
> "en-US,en;q=0.5");
>
>                 String urlParameters = "[{\"name\":
> \"log_lines\",\"columns\": [\"time\", \"line\"],\"points\":
> [[1400425947368, \"here's some useful log info\"]]}]";   //很严格
>
>                 // Send post request
>                 con.setDoOutput(true);
>                 int responseCode = con.getResponseCode();
>                 System.out.println("\nSending 'POST' request to URL : " +
> url);
>                 System.out.println("Post parameters : " + urlParameters);
>                 System.out.println("Response Code : " + responseCode);
>
>                 BufferedReader in = new BufferedReader(new
> InputStreamReader(con.getInputStream()));
>                 DataOutputStream wr = new
> DataOutputStream(con.getOutputStream());
>                 wr.writeBytes(urlParameters);
>                 String inputLine;
>
>
>
> --
> Remember to include the InfluxDB version number with all issue reports
> ---
> You received this message because you are subscribed to the Google Groups
> "InfluxDB" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/influxdb.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/influxdb/93287adf-3f20-4e10-8573-626fe748fe5c%40googlegroups.com
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Sean Beckett
Director of Support and Professional Services
InfluxDB

-- 
Remember to include the InfluxDB version number with all issue reports
--- 
You received this message because you are subscribed to the Google Groups 
"InfluxDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/influxdb.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/influxdb/CALGqCvPTNcCz27pUOf3BT-7zdPdo4bks9m0JFkY-%3Dp7URk_UsQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to