[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: HTTPAPI How to do a POST



   Hi Kevin,
   the HTTP header is a HTTPAPI thing, but you can mix powerEXT Core
   procedures
   (that supports json I/O) and HTTPAPI
   Outgoing:
   setContent('*none');
   jsonNode('*object');
   � jsonNode('*[1]string':'email':'somebody@xxxxxxxxxxxxx');
   � jsonNode('*string':givenName':'Fred');
   � jsonNode(*string':surname':Rubble');
   jsonEndNode();
   The Json object will be in bufAddr() and bufSize()
   Ingoing (simple json string):
   myMail = jsonToField(inAddr:inSize:'email');
   myName = jsonToField(inAddr:inSize:'givenName');
   mySurname = jsonToField(inAddr:inSize:'surname');
   If there is any special data encodings the jsonNode() and jsonToField()
   will
   handle them.

   On Mon, Aug 26, 2013 at 11:00 PM, Kevin Miller <[2]kmiller@xxxxxxxxx>
   wrote:

     � �With the following settings:
     � �HTTP/1.1
     � �Accept: application/json
     � �Content-Type: application/json
     � �Authorization: OAuth oauth_token={oauthToken}
     � �{
     � � �"email": "[3]somebody@xxxxxxxxxxxxx",
     � � �"givenName": "Fred",
     � � �"surname": "Rubble"
     � �}
     � �I need to set it up to use json data both to and from the
     external API,
     � �and pass in an email address, first and last name. I don't
     think I need
     � �a parser, as the data is very limited that I'm passing in and
     getting
     � �back. I also need to pass in an API Key as shown above in the
     � �Authorization line.
     � �Kevin
     --------------------------------------------------------------------
     ---
     This is the FTPAPI mailing list. �To unsubscribe, please go to:
     [4]http://www.scottklement.com/mailman/listinfo/ftpapi
     --------------------------------------------------------------------
     ---

   --
   Regards,
   Henrik Rützou
   �   [5]http://powerEXT.com
   �
References

   1. mailto:string%27%3A%27email%27%3A%27somebody@xxxxxxxxxxxxx
   2. mailto:kmiller@xxxxxxxxx
   3. mailto:somebody@xxxxxxxxxxxxx
   4. http://www.scottklement.com/mailman/listinfo/ftpapi
   5. http://powerext.com/
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------