This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Last revision Both sides next revision | ||
cs326:lab4 [2021/09/29 20:37] scarl [Part II. Exploring the HTTPoison library] |
cs326:lab4 [2021/10/04 15:35] scarl |
||
---|---|---|---|
Line 163: | Line 163: | ||
Ask for a page on my classes website that probably doesn't exist. **Record** the webpage requested and the ''status_code'' you get. | Ask for a page on my classes website that probably doesn't exist. **Record** the webpage requested and the ''status_code'' you get. | ||
- | Finally, try these. For the first two, **record** the ''headers'' list. For the next two, **record** the response. For the last one, **record** the __first five__ maps in the ''headers'' list. | + | Finally, try these. For the first two, **record** the ''headers'' list. For the rest, **record** the first element of the response tuple and the ''status_code'' if it works. |
<code> | <code> | ||
Line 170: | Line 170: | ||
HTTPoison.get "http://127.0.0.1" | HTTPoison.get "http://127.0.0.1" | ||
HTTPoison.get! "http://127.0.0.1" | HTTPoison.get! "http://127.0.0.1" | ||
+ | HTTPoison.get "http://api.github.com/repos/elixir-lang/elixir/issues" | ||
HTTPoison.get "https://api.github.com/repos/elixir-lang/elixir/issues" | HTTPoison.get "https://api.github.com/repos/elixir-lang/elixir/issues" | ||
</code> | </code> | ||
All done! Exit ''iex''. | All done! Exit ''iex''. |