Please use success callbacks of the respective functions [1]. Next time
when asking questions please post a gist[2]. It makes things easy to cook
an example :).

var url  = "https://api.twitter.com/1/statuses/user_timeline.json";;
var data = {
include_entities:true,include_rts:true,screen_name:"wso2",count:1 };
var twitterJson = get(url, data ,"json", function(data, xhr){
  print(data);

  //do your post here

});


[1] http://jaggeryjs.org/apidocs/get.jag
[2] https://gist.github.com/dulichan/8968945


On Tue, Feb 11, 2014 at 5:47 PM, Dammina Sahabandu <[email protected]> wrote:

> Hi All,
> I'm using a jaggery script which does a http *post* request, and then it
> does a http *get* request to acquire some data related to the above
> mentioned post request. But it seems to be the both functions run
> asynchronously, and eventually the *get* request completes before the
> *post* request. So it fails to acquire the requested data. How can I
> solve this problem. (I want to make the *post* request to complete before
> the *get* request)
>
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Chan (Dulitha Wijewantha)
Software Engineer - Mobile Development
WSO2Mobile
Lean.Enterprise.Mobileware
 * ~Email       [email protected] <[email protected]>*
*  ~Mobile     +94712112165*

*  ~Website   dulithawijewantha.com <http://dulithawijewantha.com/>*

*  ~Blog         blog.dulithawijewantha.com
<http://dulichan.github.io/chan/>*
*  ~Twitter     @dulitharw <https://twitter.com/dulitharw>*
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to