Commit 473a7ef
Split getUrlContents (#864)
* Split getUrlContents
Since `getUrlContents()` takes the url as a string argument, it is not possible to set headers, such as `Accept-Language`, for the request. Therefore I created `getRequest()` to generate the request based on the url string, but without fetching the contents. Then headers can be added to the request, before the request is passed to `getRequestContents()` which fetches the content.
* Rename method1 parent 3f5f2e1 commit 473a7ef
1 file changed
+29
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
57 | 58 | | |
58 | 59 | | |
59 | 60 | | |
60 | | - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
61 | 87 | | |
62 | 88 | | |
63 | 89 | | |
| |||
66 | 92 | | |
67 | 93 | | |
68 | 94 | | |
69 | | - | |
| 95 | + | |
70 | 96 | | |
71 | 97 | | |
72 | 98 | | |
73 | 99 | | |
74 | | - | |
| 100 | + | |
75 | 101 | | |
76 | 102 | | |
77 | 103 | | |
| |||
0 commit comments