Package com.ning.http.client
Interface SignatureCalculator
- All Known Implementing Classes:
OAuthSignatureCalculator
public interface SignatureCalculator
Interface that allows injecting signature calculator into
RequestBuilder so that signature calculation and inclusion can
be added as a pluggable component.- Since:
- 1.1
-
Method Summary
Modifier and TypeMethodDescriptionvoidcalculateAndAddSignature(Request request, RequestBuilderBase<?> requestBuilder) Method called whenRequestBuilder.build()method is called.
-
Method Details
-
calculateAndAddSignature
Method called whenRequestBuilder.build()method is called. Should first calculate signature information and then modify request (using passedRequestBuilder) to add signature (usually as an HTTP header).- Parameters:
request- Request that is being built; needed to access content to be signedrequestBuilder- builder that can be used to modify request, usually by adding header that includes calculated signature. Be sure NOT to callRequestBuilder.build()since this will cause infinite recursion
-