Skip to content

Commit

Permalink
Merge pull request #76 from eprints/revert-75-ejo-encoding-issue
Browse files Browse the repository at this point in the history
Revert "ejo - removed encoding"
  • Loading branch information
fatchild authored Sep 4, 2023
2 parents 8da658a + 3395290 commit cacb7ff
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/plugins/EPrints/ORCID/AdvanceUtils.pm
Original file line number Diff line number Diff line change
Expand Up @@ -196,16 +196,14 @@ sub write_orcid_record

my $uri = $repo->config( "orcid_support_advance", "orcid_apiv2") . $user->value( "orcid" ) . $item;

my $content_as_json = to_json( $content );

my $req = HTTP::Request->new( $method, $uri );
my @headers = (
'Content-type' => 'application/vnd.orcid+json',
'Authorization' => 'Bearer ' . $user->value( "orcid_access_token" ),
'Content-Lengh' => length( $content_as_json ),
'Content-Lengh' => length( encode_utf8(to_json( $content ) ) ),
);
$req->header( @headers );
$req->content( $content_as_json );
$req->content( encode_utf8(to_json( $content ) ) );

my $lwp = LWP::UserAgent->new;
my $response = $lwp->request( $req );
Expand Down

0 comments on commit cacb7ff

Please sign in to comment.