Skip to content

Commit

Permalink
rename ffi file
Browse files Browse the repository at this point in the history
  • Loading branch information
CrowdHailer authored and lpil committed Jun 12, 2024
1 parent 6615338 commit 5e7c293
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## v1.0.0 - 2024-04-22

- Renamed ffi file to be scope with project name.
- Added the `send_bits` function.

## v0.4.0 - 2024-03-07
Expand Down
14 changes: 7 additions & 7 deletions src/gleam/fetch.gleam
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pub type FetchRequest

pub type FetchResponse

@external(javascript, "../ffi.mjs", "raw_send")
@external(javascript, "../gleam_fetch_ffi.mjs", "raw_send")
pub fn raw_send(a: FetchRequest) -> Promise(Result(FetchResponse, FetchError))

pub fn send(
Expand All @@ -40,26 +40,26 @@ pub fn send_bits(
})
}

@external(javascript, "../ffi.mjs", "to_fetch_request")
@external(javascript, "../gleam_fetch_ffi.mjs", "to_fetch_request")
pub fn to_fetch_request(a: Request(String)) -> FetchRequest

@external(javascript, "../ffi.mjs", "bitarray_request_to_fetch_request")
@external(javascript, "../gleam_fetch_ffi.mjs", "bitarray_request_to_fetch_request")
pub fn bitarray_request_to_fetch_request(a: Request(BitArray)) -> FetchRequest

@external(javascript, "../ffi.mjs", "from_fetch_response")
@external(javascript, "../gleam_fetch_ffi.mjs", "from_fetch_response")
pub fn from_fetch_response(a: FetchResponse) -> Response(FetchBody)

@external(javascript, "../ffi.mjs", "read_bytes_body")
@external(javascript, "../gleam_fetch_ffi.mjs", "read_bytes_body")
pub fn read_bytes_body(
a: Response(FetchBody),
) -> Promise(Result(Response(BitArray), FetchError))

@external(javascript, "../ffi.mjs", "read_text_body")
@external(javascript, "../gleam_fetch_ffi.mjs", "read_text_body")
pub fn read_text_body(
a: Response(FetchBody),
) -> Promise(Result(Response(String), FetchError))

@external(javascript, "../ffi.mjs", "read_json_body")
@external(javascript, "../gleam_fetch_ffi.mjs", "read_json_body")
pub fn read_json_body(
a: Response(FetchBody),
) -> Promise(Result(Response(Dynamic), FetchError))
File renamed without changes.

0 comments on commit 5e7c293

Please sign in to comment.