Your SlideShare is downloading. ×
Url and http
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Url and http

334
views

Published on

Published in: Technology, Business

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
334
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. URL and HTTP• URL – http://www.nyc.gov/html/doh/html/rii/index.shtml – Is limited in what characters can be used – a black space “ “ is represented by %20 in a URL• HTTP - how resources are “fetched” on the web• HTTP Request – Request line (method = GET or PUT; path) – Header (primarily referencing the host) – Body (passing variables/selections; used in PUT)
  • 2. HTTP Response• This is the response that our http request receives back from the web server (or host)• Status – a numeric status (“404 code”)• Headers – indication of what kind of content• Body – the web page that is displayed – HTML content, javascript, etc.
  • 3. HTML / XML• Encoding information on a webpage• <b>This is bolded</b>• <a href=“www.uky.edu”>A link to UK’s webpage</a> – Open and close tags – Sets up patterns that can be parsed
  • 4. Forms…
  • 5. Get vs. Put• GET encodes the data entered by a user from a webform in the URL• POST passes the data entered by a user as a set of variables. – Much hard to see
  • 6. GEThttp://qpublic7.qpublic.net/ky_fayette_subdivison.php?searchType=form&subNumber=&subName=&sectionValue=&townshipValue=&rangeValue=&startDate=12-01-2011&endDate=12-31-2011&startPrice=&endPrice=&startArea=&endArea=&startAcreage=&endAcreage=&startYrblt=&endYrblt=&startAssd=&endAssd=&saleVacant=All&stories=All&propertyType=All&streetNumber=&streetName=&county=ky_fayette&slevel=fayette_advanced&start=0&excel_start=0&SUBMIT=Start+Query
  • 7. PUThttp://a816-restaurantinspection.nyc.gov/RestaurantInspection/SearchResults.do
  • 8. A note about libraries• Libraries are bits of pre-written code that make common tasks easier• But you have to load them before you run you code – gem install nokigiri (useful for parsing XML docs) • Alternatively one could use regular expressions – gem install httparty (useful for building http queries)