-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
gm-networktech debtThis issue relates to extra work being required.This issue relates to extra work being required.
Description
Checklist
- I have not removed the 🧹 emoji from the title.
- I have confirmed that this task is not already tracked under another tech debt or refactor issue.
- This does not represent a user-facing feature request or bug report, but an internal improvement.
- For maintainers: I have updated the projects and milestones if needed.
Description
Currently obj_http supports two body types: JSON and XML. However, the system in place to detect this was hacked together quickly to prepare for map loading (see here). We should instead create a simple struct that will be used to parse particular HTTP body types (like Sidorakh did with http.gml).
Impact
This will ensure that we can easily add new content parsers as the projects requirements grow. Realistically, this will be a much better design decision overall and will cleanup the Async HTTP event in obj_http.
Proposed Approach
- Create a struct that is used to parse incoming data.
- Essentially, just a kvp used to fetch the correct parser
- By default, we should attempt to fallback to JSON, log a warning and if that fails, throw a
Struct.HttpError.
Risks or Challenges
- Should we even attempt to fallback to JSON or should we assume that if the data returned is not in a valid format then it is invalid and an error should be thrown?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
gm-networktech debtThis issue relates to extra work being required.This issue relates to extra work being required.
Projects
Status
Backlog