Class HttpSnippetCodeGenerator
- java.lang.Object
-
- io.github.atkawa7.httpsnippet.generators.HttpSnippetCodeGenerator
-
public class HttpSnippetCodeGenerator extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description HttpSnippetCodeGenerator()HttpSnippetCodeGenerator(@NonNull CodeGenerator... codeGenerators)HttpSnippetCodeGenerator(@NonNull java.util.List<CodeGenerator> codeGenerators)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HttpSnippetsnippet(@NonNull io.github.atkawa7.har.HarRequest harRequest, @NonNull Language language)HttpSnippetsnippet(@NonNull io.github.atkawa7.har.HarRequest harRequest, @NonNull Language language, @NonNull Client client)HttpSnippetsnippet(@NonNull io.github.atkawa7.har.HarRequest harRequest, @NonNull java.lang.String language)HttpSnippetsnippet(@NonNull io.github.atkawa7.har.HarRequest harRequest, @NonNull java.lang.String language, @NonNull java.lang.String client)java.util.List<HttpSnippet>snippets(@NonNull io.github.atkawa7.har.HarRequest harRequest)
-
-
-
Constructor Detail
-
HttpSnippetCodeGenerator
public HttpSnippetCodeGenerator()
-
HttpSnippetCodeGenerator
public HttpSnippetCodeGenerator(@NonNull @NonNull CodeGenerator... codeGenerators)
-
HttpSnippetCodeGenerator
public HttpSnippetCodeGenerator(@NonNull @NonNull java.util.List<CodeGenerator> codeGenerators)
-
-
Method Detail
-
snippet
public HttpSnippet snippet(@NonNull @NonNull io.github.atkawa7.har.HarRequest harRequest, @NonNull @NonNull java.lang.String language, @NonNull @NonNull java.lang.String client) throws java.lang.Exception
- Parameters:
harRequest- The object contains detailed info about performed request.language- The target programming languageclient- The target client for the target programming language- Returns:
- The http snippet for a target. The target is searched from a list of available targets
findGeneratorusing language and client - Throws:
java.lang.Exception- throws exception
-
snippet
public HttpSnippet snippet(@NonNull @NonNull io.github.atkawa7.har.HarRequest harRequest, @NonNull @NonNull java.lang.String language) throws java.lang.Exception
- Parameters:
harRequest- The object contains detailed info about performed request.language- The target programming language- Returns:
- The http snippet for a code generator. Finds
languageand uses thedefault clientfor a language to search through the list of available code generators. - Throws:
java.lang.Exception- throws Exception
-
snippet
public HttpSnippet snippet(@NonNull @NonNull io.github.atkawa7.har.HarRequest harRequest, @NonNull @NonNull Language language, @NonNull @NonNull Client client) throws java.lang.Exception
- Parameters:
harRequest- The object contains detailed info about performed request.language- The target programming languageclient- The target client for the target programming language- Returns:
- The http snippet for a target. The target is searched from a list of available targets
findGeneratorusing language and client - Throws:
java.lang.Exception- throws Exception
-
snippet
public HttpSnippet snippet(@NonNull @NonNull io.github.atkawa7.har.HarRequest harRequest, @NonNull @NonNull Language language) throws java.lang.Exception
- Parameters:
harRequest- The object contains detailed info about performed request.language- The target programming language- Returns:
- The http snippet for a code generator. Uses the
default clientfor a language to search through the list of available code generators. - Throws:
java.lang.Exception- throws Exception
-
snippets
public java.util.List<HttpSnippet> snippets(@NonNull @NonNull io.github.atkawa7.har.HarRequest harRequest) throws java.lang.Exception
- Parameters:
harRequest- The object contains detailed info about performed request.- Returns:
- The list of http snippets using generators
- Throws:
java.lang.Exception- when fails to convert post data to json
-
-