mirror of
https://github.com/zigzap/zap.git
synced 2025-10-21 15:44:10 +00:00
zig fmt
This commit is contained in:
parent
6804d0f685
commit
dc4a07e4a5
7 changed files with 10 additions and 11 deletions
|
@ -11,7 +11,7 @@ fn makeRequest(a: std.mem.Allocator, url: []const u8) !void {
|
|||
var http_client: std.http.Client = .{ .allocator = a };
|
||||
defer http_client.deinit();
|
||||
|
||||
var result = try http_client.fetch(a,.{
|
||||
var result = try http_client.fetch(a, .{
|
||||
.method = .GET,
|
||||
.location = .{
|
||||
.uri = uri,
|
||||
|
|
|
@ -11,7 +11,7 @@ fn makeRequest(a: std.mem.Allocator, url: []const u8) !void {
|
|||
var http_client: std.http.Client = .{ .allocator = a };
|
||||
defer http_client.deinit();
|
||||
|
||||
var result = try http_client.fetch(a,.{
|
||||
var result = try http_client.fetch(a, .{
|
||||
.method = .GET,
|
||||
.location = .{
|
||||
.uri = uri,
|
||||
|
|
|
@ -2,4 +2,3 @@
|
|||
.name = "facil.io",
|
||||
.version = "0.0.12",
|
||||
}
|
||||
|
||||
|
|
|
@ -146,7 +146,7 @@ fn makeRequest(a: std.mem.Allocator, url: []const u8, auth: ?ClientAuthReqHeader
|
|||
var http_client: std.http.Client = .{ .allocator = a };
|
||||
defer http_client.deinit();
|
||||
|
||||
var result = try http_client.fetch(a,.{
|
||||
var result = try http_client.fetch(a, .{
|
||||
.location = .{
|
||||
.uri = uri,
|
||||
},
|
||||
|
@ -157,7 +157,7 @@ fn makeRequest(a: std.mem.Allocator, url: []const u8, auth: ?ClientAuthReqHeader
|
|||
// might have to do with connection pooling and connections being in
|
||||
// a different state when all data has been read?!?
|
||||
{
|
||||
if(result.body)|body|{
|
||||
if (result.body) |body| {
|
||||
std.debug.print("RESPONSE:\n{s}\n", .{body[0..]});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,10 +10,10 @@ fn makeRequest(a: std.mem.Allocator, url: []const u8) !void {
|
|||
var http_client: std.http.Client = .{ .allocator = a };
|
||||
defer http_client.deinit();
|
||||
|
||||
var result = try http_client.fetch(a,.{
|
||||
var result = try http_client.fetch(a, .{
|
||||
.method = .GET,
|
||||
.location = .{
|
||||
.uri = uri,
|
||||
.uri = uri,
|
||||
},
|
||||
.headers = h,
|
||||
});
|
||||
|
|
|
@ -15,7 +15,7 @@ fn makeRequest(a: std.mem.Allocator, url: []const u8) !void {
|
|||
var http_client: std.http.Client = .{ .allocator = a };
|
||||
defer http_client.deinit();
|
||||
|
||||
var result = try http_client.fetch(a,.{
|
||||
var result = try http_client.fetch(a, .{
|
||||
.method = .GET,
|
||||
.location = .{
|
||||
.uri = uri,
|
||||
|
@ -24,9 +24,9 @@ fn makeRequest(a: std.mem.Allocator, url: []const u8) !void {
|
|||
});
|
||||
defer result.deinit();
|
||||
|
||||
if(result.body)|body|{
|
||||
if (result.body) |body| {
|
||||
read_len = body.len;
|
||||
std.mem.copyForwards(u8,&buffer,body);
|
||||
std.mem.copyForwards(u8, &buffer, body);
|
||||
}
|
||||
zap.stop();
|
||||
}
|
||||
|
|
|
@ -160,7 +160,7 @@ fn sendToDiscordPart(allocator: std.mem.Allocator, url: []const u8, message_json
|
|||
var http_client: std.http.Client = .{ .allocator = allocator };
|
||||
defer http_client.deinit();
|
||||
|
||||
var result = try http_client.fetch(allocator,.{
|
||||
var result = try http_client.fetch(allocator, .{
|
||||
.method = .POST,
|
||||
.location = .{
|
||||
.uri = uri,
|
||||
|
|
Loading…
Add table
Reference in a new issue