Created
December 2, 2018 20:15
-
-
Save Downes/c3fbe6f0e2e6042970d5fdd2b99e76b9 to your computer and use it in GitHub Desktop.
Create Issuer API request for Badgr in Perl
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Create Request JSON | |
| my $issuer_json = qq|{ | |
| "name": "$issuer->{name}", | |
| "email": "$issuer->{email}", | |
| "description": "$issuer->{description}", | |
| "url": "$issuer->{url}" | |
| }|; | |
| # Format Request | |
| my $create_issuer_url = $self->{badgr_url}."/v2/issuers"; | |
| my $header = ['Authorization' => 'Bearer '.$self->{access_token},"Content-Type" => "application/json"]; | |
| my $req = HTTP::Request->new('POST', $create_issuer_url, $header, $issuer); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment