放心使用x-www-form-urlencoded和Oauth1

时间:2016-03-15 02:59:13

标签: codeigniter oauth rest-assured

我发布了一个问题,在发布API时使用了Rest-assured for testing framework和CodeIgniter并将Oauth1作为API后端,

$this->input->post无法处理查询参数,所以我决定选择formParam

但是,当我启动测试用例时,它说oauth_problem和无效签名

任何人都可以帮助我吗?感谢

在我放心的测试案例中

        String result = given().
            header("return-type","text/json").
            contentType("application/x-www-form-urlencoded").
            formParam("offer_price","33330").
            auth().oauth(OauthData.CONSUMER_KEY, OauthData.CONSUMER_SECRET, OauthData.TOKEN_BUYER, OauthData.TOKEN_SECRET_BUYER).
    expect().
                statusCode(200).
    when().
    post(OauthData.API_BASE + "/v1/offer/" + "56b484ca36913473000041b0")
            .asString();

0 个答案:

没有答案
相关问题