[webservices] POST input to dataselect/1/query returning 400 ? [SEC=UNCLASSIFIED]

Chad Trabant chad at iris.washington.edu
Wed May 1 22:41:29 PDT 2013


Hi Carl,

For your wget command, instead of the --post-data option try the --post-file option.  This worked for me:

wget --debug --post-file foo.in http://service.iris.edu/fdsnws/dataselect/1/query

cheers,
Chad

On May 1, 2013, at 10:02 PM, Carl.Sandland at ga.gov.au wrote:

> Hello,
>  
> I’m moving my code over to the new FSDN endpoints and am having trouble with the bulkdataselect replacement, dataselect:
>  
> Here is an example input:
> IC BJT 00 BHE 2005-01-01T00:00:00 2005-01-01T00:10:00
> IC BJT 00 BHN 2005-01-01T00:00:00 2005-01-01T00:10:00
> IC BJT 00 BHZ 2005-01-01T00:00:00 2005-01-01T00:10:00
>  
> Here is my wget command:
> $ wget --debug --post-data foo.inhttp://service.iris.edu/fdsnws/dataselect/1/query
>  
> And here is the result:
> ----------------------- snip
> Setting --post-data (postdata) to foo.in
> DEBUG output created by Wget 1.11.4 Red Hat modified on linux-gnu.
>  
> --2013-05-02 14:39:17-- http://service.iris.edu/fdsnws/dataselect/1/query
> Resolving proxy.ga.gov.au... 10.7.64.209
> Caching proxy.ga.gov.au => 10.7.64.209
> Connecting to proxy.ga.gov.au|10.7.64.209|:8080... connected.
> Created socket 3.
> Releasing 0x000000000db41ba0 (new refcount 1).
>  
> ---request begin---
> POST http://service.iris.edu/fdsnws/dataselect/1/queryHTTP/1.0
> User-Agent: Wget/1.11.4 Red Hat modified
> Accept: */*
> Host: service.iris.edu
> Content-Type: application/x-www-form-urlencoded
> Content-Length: 6
>  
> ---request end---
> [POST data: foo.in]
> Proxy request sent, awaiting response...
> ---response begin---
> HTTP/1.1 400 Bad Request
> Via: 1.1 PROXY3
> Connection: close
> Proxy-Connection: close
> Date: Thu, 02 May 2013 04:39:18 GMT
> Content-Type: text/plain
> Server: Apache-Coyote/1.1
> Access-Control-Allow-Origin: *
> Vary: Accept-Encoding
>  
> ---response end---
> 400 Bad Request
> Closed fd 3
> 2013-05-02 14:39:18 ERROR 400: Bad Request.
> ------------------ end snip
>  
> Any help would be greatly appreciated: hopefully it’s a simple user error…
>  
> Cheers,
>  
> Carl Sandland 
> Software Consultant  |  Nuclear Monitoring Project
> Minerals and Natural Hazards Division  |  GEOSCIENCE AUSTRALIA
> ____________________________________________________________
> Phone:  +61 2 6249 5800    Fax:  +61 2 6249 9999
> Email:  Carl.Sandland at ga.gov.au    Web:  www.ga.gov.au
> Cnr Jerrabomberra Avenue and Hindmarsh Drive Symonston ACT
> GPO Box 378 Canberra ACT 2601 Australia
> Applying geoscience to Australia’s most important challenges
> Geoscience Australia Disclaimer: This e-mail (and files transmitted with it) is intended only for the person or entity to which it is addressed. If you are not the intended recipient, then you have received this e-mail by mistake and any use, dissemination, forwarding, printing or copying of this e-mail and its file attachments is prohibited. The security of emails transmitted cannot be guaranteed; by forwarding or replying to this email, you acknowledge and accept these risks.
> -------------------------------------------------------------------------------------------------------------------------
> 
> _______________________________________________
> webservices mailing list
> webservices at iris.washington.edu
> http://www.iris.washington.edu/mailman/listinfo/webservices

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.iris.washington.edu/pipermail/webservices/attachments/20130501/b7f617c4/attachment-0001.htm>


More information about the webservices mailing list