Dear Monks,
I am trying to understand how to create API for querying CJ affiliate network. However the question is probably more general. They suggest to use REST technology and gave an example:
sample URL: https://product-search.api.cj.com/v2/product-search?websit +e-id=12345678keywords=GPS&serviceable-area=US and Sample Header: https://product-search.api.cj.com/v2/product-search?website-id=1594990 +&keywords=%2Bsony+-camera GET /v2/product-search?website-id=1594990&keywords=%2Bsony+-camera HTT +P/1.1 Host: link-search.api.cj.com User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.0.8 +) Gecko/2009032609 Firefox/3.0.8 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0. +8 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive Cookie: __utma=128446558.2099392322683464700.1239639722.1239639722.123 +9927095.2; __utmz=128446558.1239639722.1.1.utmcsr=(direct)|utmccn=(di +rect)|utmcmd=(none); CONTID=8073; cjuMember=0; JSESSIONID=aM5RSWdqdd_ +5 Authorization: YOUR DEV KEY HERE HTTP/1.x 200 OK Server: Resin/2.1.17 Content-Type: application/xml Transfer-Encoding: chunked Date: Thu, 26 Apr 2009 10:25:03 GMT
What should I do to create API requests based on these requirements. I guess something like LWP, but I did not find how to insert all these fields there.
So please help.

In reply to Creating REST API by vit

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.