V1_1

NAME

WebService::SOP::V1_1 - SOP v1.1 API request authentication

SYNOPSIS

use WebService::SOP::V1_1;
my WebService::SOP::V1_1 $sop
    .= new(app-id => 1234, app-secret => 'foobar');
#
  # To create a GET request object
  #
  my HTTP::Request $req = $sop.get-req(
    'https://partners.surveyon.com/path/to/endpoint',
    { aaa => 'aaa', bbb => 'bbb' },
  );
#
  # To create a POST request object
  #
  my HTTP::Request $req = $sop.post-req(
    'https://partners.surveyon.com/path/to/endpoint',
    { aaa => 'aaa', bbb => 'bbb' },
  );
#
  # To create a POST request with JSON body
  #
  my HTTP::Request $req = $sop.post-json-req(
    'https://partners.surveyon.com/path/to/endpoint',
    { aaa => 'aaa', bbb => 'bbb },
  );

DESCRIPTION

WebService::SOP::Auth::V1_1 is SOP v1.1 authenticated request creator and validator.

METHODS

get-req($uri, Hash:D $params) returns HTTP::Request

Creates a GET request object.

post-req($uri, Hash:D $params) returns HTTP::Request

Creates a POST request object with content-type `application/x-www-form-urlencoded`.

post-json-req($uri, Hash:D $params) returns HTTP::Request

Creates a POST request object with content-type `application/json`.

put-req($uri, Hash:D $params) returns HTTP::Request

Creates a PUT request object with content-type `application/x-www-form-urlencoded`.

put-json-req($uri, Hash:D $params) returns HTTP::Request

Creates a PUT request object with content-type `application/json`.

delete-req($uri, Hash:D $params) returns HTTP::Request

Creates a DELETE request object.

AUTHOR

yowcow <[email protected]>

COPYRIGHT AND LICENSE

Copyright 2016 yowcow

This library is free software; you can redistribute it and/or modify it under the Artistic License 2.0.

The Camelia image is copyright 2009 by Larry Wall. "Raku" is trademark of the Yet Another Society. All rights reserved.