Lines 110-116
sub new {
Link Here
|
110 |
|
110 |
|
111 |
my $resp = $ua->post( |
111 |
my $resp = $ua->post( |
112 |
"$url/authentication", |
112 |
"$url/authentication", |
113 |
{ login_userid => $user, login_password => $password, csrf_token => $csrf_token } |
113 |
'Csrf-Token' => $csrf_token, |
|
|
114 |
'Content' => { login_userid => $user, login_password => $password } |
114 |
); |
115 |
); |
115 |
die $resp->status_line unless $resp->is_success; |
116 |
die $resp->status_line unless $resp->is_success; |
116 |
|
117 |
|
Lines 152-160
sub post {
Link Here
|
152 |
my $url = $self->{url}; |
153 |
my $url = $self->{url}; |
153 |
warn "# post $url/bib/$biblionumber\n" if $self->{debug}; |
154 |
warn "# post $url/bib/$biblionumber\n" if $self->{debug}; |
154 |
my $csrf_token = $self->{csrf_token}; |
155 |
my $csrf_token = $self->{csrf_token}; |
155 |
my $resp = $self->{ua}->post( |
156 |
my $resp = $self->{ua}->post( |
156 |
"$url/bib/$biblionumber", 'Content_type' => 'text/xml', Content => $marcxml, |
157 |
"$url/bib/$biblionumber", |
157 |
csrf_token => $csrf_token |
158 |
'Content_type' => 'text/xml', |
|
|
159 |
'Csrf_Token' => $csrf_token, |
160 |
'Content' => $marcxml, |
158 |
); |
161 |
); |
159 |
die $resp->status_line unless $resp->is_success; |
162 |
die $resp->status_line unless $resp->is_success; |
160 |
return $resp->decoded_content; |
163 |
return $resp->decoded_content; |
161 |
- |
|
|