I want to use "post" to submit my sequence automatically to http://www.ncbi.nlm.nih.gov/Structure/cdd/wrpsb.cgi. What kind of URL will I use? what kind of content should I use? $req->content('match=www&errors=0'); Please Help! The code is:
#!/usr/bin/perl use LWP::Simple; use LWP::UserAgent; $ua = new LWP::UserAgent; my $req = new HTTP::Request 'POST','http://www.ncbi.nlm.nih.gov/htbin- +post/Entrez/query?uid=9254694&form=6&db=m&Dopt=r'; $req->content_type('application/x-www-form-urlencoded'); $req->content('match=www&errors=0'); my $res = $ua->request($req); print $res->as_string,"\n";
Here is the output:
HTTP/1.1 200 OK Connection: close Date: Tue, 08 Apr 2003 02:33:07 GMT Via: 1.1 www.ncbi.nih.gov Server: Apache Content-Type: text/html Client-Date: Tue, 08 Apr 2003 02:33:28 GMT Client-Peer: 130.14.29.110:80 Client-Response-Num: 1 Client-Transfer-Encoding: chunked Title: Entrez Error X-Cache: MISS from www.ncbi.nih.gov <html> <head> <TITLE>Entrez Error</TITLE> </head> <body> <HR> <H1>Error</H1><P> This link contained an data type unknown to Entrez. </body> </html>
Thanks in advance!

20030408 Edit by Corion: Added second pair of code tags


In reply to how to decide the URL by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.