Skip to content

Latest commit

 

History

History

edgegrid-signer-rest-assured

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

REST-assured - EdgeGrid Client for Java

Maven Central Javadoc

This library implements Akamai EdgeGrid Authentication for Java. This particular module is a binding for REST-assured library. This project contains installation and usage instructions in the README.md.

Use with REST-assured

Include the following Maven dependency in your project POM:

<dependency>
    <groupId>com.akamai.edgegrid</groupId>
    <artifactId>edgegrid-signer-rest-assured</artifactId>
    <version>5.0.0</version>
</dependency>

Sign your REST-assured request specification with a defined client credential:

given()
    .filter(new RestAssuredEdgeGridFilter(clientCredential))
.when()
    .get("/billing-usage/v1/reportSources")
.then()
    .statusCode(200);

REST-assured request specifications must contain a relative path in get(path), post (path) etc.

Alternative: Use the Apache HTTP Client bindings

REST-assured does not expose certain capabilities effectively. In particular it does not support re-triggering its filters when following a 301/302 redirect. The result of following a redirect is presently an invalid request signature and a rejected request.

If you experience this problem, you can use the Apache HTTP Client binding instead of the REST-assured binding. This will be functionally equivalent, and will also sign redirected requests properly. Usage instructions can be found in the README file for that module.