Skip to content

Commit

Permalink
Move form_data to fetch/form_data
Browse files Browse the repository at this point in the history
  • Loading branch information
ghivert authored and lpil committed Nov 19, 2024
1 parent 6ffe451 commit b571cc1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/gleam/fetch.gleam
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import gleam/dynamic.{type Dynamic}
import gleam/form_data.{type FormData}
import gleam/fetch/form_data.{type FormData}
import gleam/http/request.{type Request}
import gleam/http/response.{type Response}
import gleam/javascript/promise.{type Promise}
Expand Down
10 changes: 5 additions & 5 deletions src/gleam/form_data.gleam → src/gleam/fetch/form_data.gleam
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
pub type FormData

@external(javascript, "../gleam_fetch_ffi.mjs", "newFormData")
@external(javascript, "../../gleam_fetch_ffi.mjs", "newFormData")
pub fn new() -> FormData

@external(javascript, "../gleam_fetch_ffi.mjs", "appendFormData")
@external(javascript, "../../gleam_fetch_ffi.mjs", "appendFormData")
pub fn append(form_data: FormData, key: String, value: String) -> FormData

@external(javascript, "../gleam_fetch_ffi.mjs", "appendBitsFormData")
@external(javascript, "../../gleam_fetch_ffi.mjs", "appendBitsFormData")
pub fn append_bits(
form_data: FormData,
key: String,
value: BitArray,
) -> FormData

@external(javascript, "../gleam_fetch_ffi.mjs", "setFormData")
@external(javascript, "../../gleam_fetch_ffi.mjs", "setFormData")
pub fn set(form_data: FormData, key: String, value: String) -> FormData

@external(javascript, "../gleam_fetch_ffi.mjs", "setBitsFormData")
@external(javascript, "../../gleam_fetch_ffi.mjs", "setBitsFormData")
pub fn set_bits(form_data: FormData, key: String, value: BitArray) -> FormData

0 comments on commit b571cc1

Please sign in to comment.