Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

worldcat identities needs to send Accept header after change to API

  • Loading branch information...
commit 45a3ef0bff5daa3df040b5449200725b1bed3b6c 1 parent 820c14c
@jrochkind jrochkind authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/service_adaptors/worldcat_identities.rb
View
4 lib/service_adaptors/worldcat_identities.rb
@@ -127,7 +127,7 @@ def do_query(request, index, query)
# we only request 1 record to hopefully speed things up.
link = @url + index + '?query=' +query + "&maximumRecords=1"
- result = open(link).read
+ result = open(link, "Accept"=>"text/xml").read
xml = Hpricot.XML(result)
return nil if (xml/"numberOfRecords").inner_text == '0'
create_link(request, xml)
@@ -572,4 +572,4 @@ def clean_oclcnum(num)
"wit" => "Witness"
}
-end
+end
Please sign in to comment.
Something went wrong with that request. Please try again.