Convert change log to new format
These changes convert the changelog into the new standard format with the required headings and bullet format. I've also made some minor copy edits.
@dasTholo thanks for the detailed report! This is probably because main got updated yesterday but new package version wasn't published to the prefix channel. Just updated, you can also trying changing [dependencies] to lightbug_http = ">=0.1.4,<0.2". Worked for me on a test VM, let me know if this doesn't solve the problem. Here's an example that works for me:
from lightbug_http import *
from lightbug_http.sys.client import MojoClient
fn test_request(inout client: MojoClient) raises -> None:
var uri = URI.parse_raises("http://httpbin.org/status/404")
var headers = Header("Host", "httpbin.org")
var request = HTTPRequest(uri, headers)
var response = client.do(request^)
# print status code
print("Response:", response.status_code)
# print parsed headers (only some are parsed for now)
print("Content-Type:", response.headers["Content-Type"])
print("Content-Length", response.headers["Content-Length"])
print("Server:", to_string(response.headers["Server"]))
print(
"Is connection set to connection-close? ", response.connection_close()
)
# print body
print(to_string(response.body_raw))
fn main() -> None:
try:
var client = MojoClient()
test_request(client)
except e:
print(e)
Interestingly, with your test code I'm getting URI is nil. Will investigate this and likely address in #48
Thank you very much!
Yeah, upgrade will help with the imports! But yes "URI is nil" no result or status codes