如何向Ruby中的网站api发送http post请求?

时间:2015-07-16 10:00:15

标签: ruby http twitter request http-post

如何向网站发送http post请求?例如:

@Component
public class ThreadExecutorFactory {


    private int THREAD_LIMIT = 100;
    private final Executor executor;

    public ThreadExecutorFactory() {
        executor = Executors.newFixedThreadPool(THREAD_LIMIT,
                new ThreadFactory() {
                    public Thread newThread(Runnable r) {
                        Thread t = new Thread(r);
                        t.setDaemon(true);
                        return t;
                    }
                });
    }

    public Executor getExecutor() {
        return executor;
    }
}

(我编了那个网址) 我不确定如何使用网址请求ruby。 请帮忙 :\ &安培;感谢您的时间和考虑

编辑:我是否使用Curb gem?

1 个答案:

答案 0 :(得分:0)

尝试 -

 <%= button_to("Twitter","http://api.twitter.com/user_friendslist/json", method: :post) %>