Post请求:
带json格式内容:
Groovy :
import HTTPClient.HTTPResponse
import HTTPClient.NVPair
import ch.qos.logback.classic.Level
import net.grinder.plugin.http.HTTPPluginControl
import net.grinder.plugin.http.HTTPRequest
import net.grinder.script.GTest
import net.grinder.scriptengine.groovy.junit.GrinderRunner
import net.grinder.scriptengine.groovy.junit.annotation.BeforeProcess
import net.grinder.scriptengine.groovy.junit.annotation.BeforeThread
import org.junit.Test
import org.junit.runner.RunWith
import org.slf4j.LoggerFactory
import static net.grinder.script.Grinder.grinder
import static org.hamcrest.Matchers.is
import static org.junit.Assert.assertThat
/**
* Created by nd-xm-mac5 on 15/12/24.
*/
@RunWith(GrinderRunner)
class LoginDemo {
public static GTest test
public static HTTPRequest request
@BeforeProcess
public static void beforeProcess() {
HTTPPluginControl.getC