question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Scala Common Enrich: support POST requests in API Request enrichment

See original GitHub issue

Currently the API request enrichment only supports GET requests where each of the inputs is either added as part of the URL path or alternatively as part of the query parameters.

Supporting POST would make it possible to reliably send significantly larger payloads that may either involve a large number of inputs or a smaller number of inputs but with a large amount of text (e.g., encrypted data, large arrays etc).

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
aparracommented, Aug 30, 2018

@alexanderdean Yes, currently it is 1.

				"cache": {
					"type": "object",
					"properties": {
						"size": {
							"type": "integer",
							"minimum": 1
						},
						"ttl": {
							"type": "integer",
							"minimum": 0,
							"maximum": 86400
						}
					},
					"additionalProperties": false,
					"required": ["size", "ttl"]
				}

I think in this case, we need only create a new version of JSON Schema when "size": { "type": "integer", "minimum": 0 }.

Current implementation of cache supports size = 0:

val cache = Cache(size = 0, ttl = 0)
val key   = ApiRequestEnrichment.cacheKey(url = "http://api.acme.com/url", body = None)

cache.put(key, JInt(42).success)
cache.get(key) must beNone and (cache.actualLoad must beEqualTo(0))
2reactions
miikecommented, Aug 7, 2018

Agreed - it isn’t semantically ideal from a REST point of view but could also make it quite a bit easier to support POST queries to GraphQL APIs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Effective data enrichment in Spark jobs from external API
Enriching a dataframe with some data gathered from external API; Reading/writing data from some database that doesn't have a usual Spark ...
Read more >
Simple REST Requests Using Requests-Scala - Baeldung
Requests -Scala is a Scala port of the popular Python library Requests. It provides a straightforward API to make REST calls.
Read more >
Enrichment and batch processing in Snowplow - datamindedbe
Enrichment starts with an adapter mapping raw HTTP GET and POST requests to one or more “raw events”. Raw events have properties and...
Read more >
Data Enrichment in Flink SQL using HTTP Connector For Flink
In this blog post I will focus on the use case we came across: using Flink SQL to enrich data streams with data...
Read more >
Snowplow Enrichment - Scaladex
Snowplow Enrich · Snowplow Common Enrich - a core library, containing all validation and transformation logic. · Snowplow Stream Enrich - a set...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found